Skip to content

Instantly share code, notes, and snippets.

@jzempel
Created June 22, 2012 20:45
Show Gist options
  • Save jzempel/2975074 to your computer and use it in GitHub Desktop.
Save jzempel/2975074 to your computer and use it in GitHub Desktop.
Flask and Flask-Babel Exception (simplified)
from flask.ext.babel import lazy_gettext
import os
import pickle
text = lazy_gettext('foo')
pickle.dump(text, open('lazy.string', 'wb'))
broken = pickle.load(open('lazy.string', 'rb'))
os.remove('lazy.string')
broken._kwargs # Traceback ... RuntimeError: maximum recursion depth exceeded while calling a Python object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment