Since recent GAE releases the following warning shows up:
WARNING 2013-10-02 15:39:49,077 api_config.py:1771] Method specifies path parameters but you are not using a ResourceContainer. This will fail in future releases; please switch to using ResourceContainer as soon as possible.
EndpointsModel.method and EndpointsModel.query_method set request_message, these should wrap the ProtoModel() in an endpoints.ResourceContainer.
Maybe @kdeus or @danholevoet could have a look at this.
Getting endpoints.ResourceContainer was one of my last efforts before leaving, I hope you like the change (it was needed to really adhere to the spec).
@sstriker I'm happy to review any changes if you'd like to take a stab as well.
The warning is happening because one of your method's paths refers to a parameter in the request message. While a possible workaround is to specify request_message=... with a ResourceContainer, that pretty much defeats the purpose of the endpoints-proto-datastore library.
We could have endpoints-proto-datastore recognize path parameters and automatically create a ResourceContainer to wrap them... But we could just as easily do the same thing in the core Endpoints library, and I'm drawing a blank as to why we didn't do that in the first place. @dhermes, do you remember?
@sstriker the now merged pull request #80 should resolve all those warnings without any changes necessary in your code. Can you check if it works correctly for you?
Works OK for me.
@Scarygami Indeed seems to work correctly for me; no more warnings.
I'm still receiving warnings with Development SDK 1.8.9
I am still getting the below error running GAE 1.9.1
WARNING 2014-09-08 05:58:31,542 api_config.py:1785] Method erpmcs.salesorders.update specifies path parameters but you are not using a ResourceContainer. This will fail in future releases; please switch to using ResourceContainer as soon as possible.
My method is as below:
def SalesOrderUpdate(self, salesOrder_request):
@kayef which version of this library are you using? What is the commit hash of HEAD?
@dhermes I'm not sure. I downloaded the whole endpoints-proto-datastore folder some time back.
How do I check the version?
The zip was last updated at commit a261da0 while this bug was filed two months after that commit.
Try updating your copy of endpoints-proto-datastore by cloning this repo and using the most recent commit.
@dhermes I have updated to the latest one and the commit is:
But I'm still getting the same warning.
What else can I do?
Can you make sure you are importing the new version and not the old one. You can do this in the dev server by opening the Interactive Console and typing
to make sure it's coming from the right place.
If the issue persists: