Skip to content

Instantly share code, notes, and snippets.

@johntynan
Created November 22, 2011 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johntynan/1384892 to your computer and use it in GitHub Desktop.
Save johntynan/1384892 to your computer and use it in GitHub Desktop.
Removing @cache() decorator from thank_yous, producer_messages, and header in refresh.py due to PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
Traceback (most recent call last):
File "/home/john/webdev/web2py_pledgedrivetracker/gluon/restricted.py", line 194, in restricted
exec ccode in environment
File "/home/john/webdev/web2py_pledgedrivetracker/applications/pledgedrives/controllers/refresh.py:thank_yous", line 293, in <module>
File "/home/john/webdev/web2py_pledgedrivetracker/gluon/globals.py", line 149, in <lambda>
self._caller = lambda f: f()
File "/home/john/webdev/web2py_pledgedrivetracker/gluon/cache.py", line 424, in action
return cache_model(key, func, time_expire)
File "/home/john/webdev/web2py_pledgedrivetracker/gluon/contrib/gae_memcache.py", line 39, in __call__
self.set(key, (time.time(), value))
File "/home/john/webdev/gae_pledgedrivetracker/google/appengine/api/memcache/__init__.py", line 767, in set
namespace=namespace)
File "/home/john/webdev/gae_pledgedrivetracker/google/appengine/api/memcache/__init__.py", line 872, in _set_with_policy
time, '', namespace)
File "/home/john/webdev/gae_pledgedrivetracker/google/appengine/api/memcache/__init__.py", line 951, in _set_multi_async_with_policy
stored_value, flags = _validate_encode_value(value, self._do_pickle)
File "/home/john/webdev/gae_pledgedrivetracker/google/appengine/api/memcache/__init__.py", line 227, in _validate_encode_value
stored_value = do_pickle(value)
File "/home/john/webdev/gae_pledgedrivetracker/google/appengine/api/memcache/__init__.py", line 395, in _do_pickle
pickler.dump(value)
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment