I've got a recursion error in both my local code, and when deployed.
But it doesn't make much sense.

At first I thought it was to do with mixing unicode strings in
dictionaries.
But I've ironed that out.

Hopefully this is a simple mistake?

@@@ python

splashes = [
  {
  'url':           splash.url,
  'title':         splash.title(),
  'thumbnail_url': splash.thumbnail_url()
  }
  for splash in record.url_records()
]
logging.info("setting values: %s" % splashes)
memcache.add(cache_key, splashes, 60)

@@@

and the log output when it breaks;

@@@ log

INFO     2009-02-01 23:32:05,256 splashto.py] setting values: [{'url':
u'http://code.google.com/apis/ajaxsearch/documentation',
'thumbnail_url': u'http://images.websnapr.com/?
size=S&key=69wD353Q05qN&url=http%3A%2F%2Fcode.google.com%2Fapis
%2Fajaxsearch%2Fdocumentation', 'title': u'Developer'sGuide -
Google AJAX Search API - Google Code'}, {'url': u'http://
facebook.com', 'thumbnail_url': u'http://images.websnapr.com/?
size=S&key=69wD353Q05qN&url=http%3A%2F%2Ffacebook.com', 'title':
u'http://facebook.com'}]

ERROR    2009-02-01 23:32:05,336 __init__.py] maximum recursion depth
exceeded
Traceback (most recent call last):
  File "/usr/local/lib/google_appengine/google/appengine/ext/webapp/
__init__.py", line 498, in __call__
    handler.get(*groups)
  File "/home/matthew/code/splashTo/splashto.py", line 39, in get
    splashes = get_splashes(key)
  File "/home/matthew/code/splashTo/splashto.py", line 66, in
get_splashes
    memcache.add(cache_key, splashes, 60)
  File "/usr/local/lib/google_appengine/google/appengine/api/memcache/
__init__.py", line 557, in add
    return self._set_with_policy(MemcacheSetRequest.ADD, key, value,
time=time)
  File "/usr/local/lib/google_appengine/google/appengine/api/memcache/
__init__.py", line 602, in _set_with_policy
    stored_value, flags = _validate_encode_value(value,
self._do_pickle)
  File "/usr/local/lib/google_appengine/google/appengine/api/memcache/
__init__.py", line 170, in _validate_encode_value
    stored_value = do_pickle(value)
  File "/usr/local/lib/google_appengine/google/appengine/api/memcache/
__init__.py", line 274, in DoPickle
    self._pickler_instance.dump(value)
  File "/usr/lib/python2.5/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/lib/python2.5/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
...
(this goes on for hundreds of lines)
...
File "/usr/lib/python2.5/pickle.py", line 419, in save_reduce
    save(state)
  File "/usr/lib/python2.5/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.5/pickle.py", line 649, in save_dict
    self._batch_setitems(obj.iteritems())
  File "/usr/lib/python2.5/pickle.py", line 681, in _batch_setitems
    save(v)
  File "/usr/lib/python2.5/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.5/pickle.py", line 725, in save_inst
    save(stuff)
  File "/usr/lib/python2.5/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.5/pickle.py", line 649, in save_dict
    self._batch_setitems(obj.iteritems())
  File "/usr/lib/python2.5/pickle.py", line 681, in _batch_setitems
    save(v)
  File "/usr/lib/python2.5/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.5/pickle.py", line 496, in save_unicode
    self.write(BINUNICODE + pack("<i", n) + encoding)
RuntimeError: maximum recursion depth exceeded

@@@

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to