Memcache Attribute Error on .get(key)

42 views
Skip to first unread message

Dzhovani Chemishanov

unread,
Jan 28, 2019, 4:15:58 AM1/28/19
to google-a...@googlegroups.com
Hi,
We store results from datastore queries in memcache with the query
as key and results as values. We started having issues with one of the
datastore models and I'm not sure if the issues is in our code or
something with memcache or with pickle. The relevant part of the stack
trace is:

entries = memcache.get(query)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
line 562, in get
results = rpc.get_result()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py",
line 615, in get_result
return self.__get_result_hook(self)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
line 632, in __get_hook
returned_item.flags(), self._do_unpickle)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
line 273, in _decode_value
return do_unpickle(value)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
line 404, in _do_unpickle
return unpickler.load()
AttributeError: 'module' object has no attribute 'Project'

where 'Project' is a class Project(db.Model) and no recent deployments
to the serving version had been made in the last few months.

--
-------- Disclaimer --------
This email and any files transmitted may
contain proprietary and confidential information of ICT Group N.V. or any
of its subsidiaries like Strypes (“ICT”) and is intended only for the (use
of the) named recipient(s) above. If you have received this message in
error or are not the intended or named recipient(s) of this message, please
immediately notify the sender by returning and deleting this email message
from your computer. Any views or opinions presented are solely those of its
author and do not necessarily represent those of Strypes or ICT. You are
hereby notified that unauthorized disclosure, use, dissemination,
forwarding, printing or copying of this e-mail and its attachments either
whole or partial of its contents is strictly prohibited. Strypes or ICT
cannot guarantee that email communications are secure and error-free and
does not accept any liability for damages resulting from the use of email.
The general terms and conditions of purchase respectively sale and delivery
of ICT are applicable to all transactions and undertakings resulting
therefrom.

Mohammad I (Cloud Platform Support)

unread,
Feb 8, 2019, 5:51:04 PM2/8/19
to Google App Engine

Hello Dzhovani,


These two documents [1][2] provide further details on AttributeError. The AttributeError in Python is raised when an invalid attribute reference is made, or when an attribute assignment fails.


From the definition and looking into number of StackOverflow cases it appears the issue is in the code.


However it is difficult to tell with certainty why you are receiving the error without inspecting the logs or looking into the codes of your project.


Please kindly note that this forum is meant for general discussion of the App Engine platform, not specific technical issues.


If you believe that what you've encountered is platform specific issue you can report this by creating an issue in the Issue Tracker and Google Cloud Support team member will assist you to resolve your issue.  If your issue is not a platform issue but rather a problem with how you've configured your code, although you're not sure what it may be specifically, you should post to StackOverflow and community of developers will assist you.


Reply all
Reply to author
Forward
0 new messages