I just had a similar problem with CherryPy's session pickling.
I diagnosed it by modifying FileStoreage.save (in cherrypy/filters/
sessionfilter.py) :
def save(self, id, data, expiration_time):
file_path = self._get_file_path(id)
f = open(file_path, "wb")
try:
pickle.dump((data, expiration_time), f)
except TypeError, e:
raise TypeError, 'CherryPy FileStorage. attempted to
pickle:\n%r'%data
f.close()
(You probably won't want to do this in any kind of production
environment.)
In my case I came a cross an error here, when I thought I was only,
pickling static form data from a form. All had worked well until I had
added recently added a validator.
When I looked at the enriched error message, it turned out that the
validator was including a function to the form data well.
{'forms_data': {'1.1238714380.0':
{'wo_form_key': u'1.1238713793.0',
...
'store_id': u'2',
'tg_exceptions': None,
'tg_source': <function get_errors at 0xb5df233c>,
'action': u'add', 'order_date': datetime.datetime(2009, 4, 3, 10, 19,
40, 202289), 'order_submit': u'Submit Order', 'delivery_date':
u'04/04/2009', 'description': u''
}},
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---