Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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