0
votes

I have two python projects running locally:

  1. A cloud endpoints python project using the latest App Engine version.
  2. A client project which consumes the endpoint functions using the latest google-api-python-client (v 1.5.1).

Everything was fine until I renamed one endpoint's function from:

@endpoints.method(MyRequest, MyResponse, path = "save_ocupation", http_method='POST', name = "save_ocupation")
    def save_ocupation(self, request):
        [code here]

To:

@endpoints.method(MyRequest, MyResponse, path = "save_occupation", http_method='POST', name = "save_occupation")
    def save_occupation(self, request):
        [code here]

Looking at the local console (http://localhost:8080/_ah/api/explorer) I see the correct function name.

However, by executing the client project that invokes the endpoint, it keeps saying that the new endpoint function does not exist. I verified this using the ipython shell: The dynamically-generated python code for invoking the Resource has the old function name despite restarting both the server and client dozens of times.

How can I force the api client to get always the latest endpoint api document?

Help is appreciated.

1

1 Answers

0
votes

Just after posting the question, I resumed my Ubuntu PC and started Eclipse and the python projects from scratch and now everything works as expected. This sounds like a kind of a http client cache, or a stale python process, which prevented from getting the latest discovery document and generating the corresponding resource code.

This is odd as I have tested running these projects outside and inside Eclipse without success. But I prefer documenting this just in case someone else has this issue.