在我的django應用程序中,我使用會話變量創建了一個擴展的用戶配置文件。但是,當保存登記表和用戶正要創造,我有以下錯誤:使用會話時Python酸洗錯誤
Traceback (most recent call last):
File "\Python26\Lib\site-packages\django\core\servers\basehttp.py", line 279, in run
self.result = application(self.environ, self.start_response)
File "\Python26\Lib\site-packages\django\core\servers\basehttp.py", line 651, in __call__
return self.application(environ, start_response)
File "\Python26\Lib\site-packages\django\core\handlers\wsgi.py", line 245, in __call__
response = middleware_method(request, response)
File "\Python26\Lib\site-packages\django\contrib\sessions\middleware.py", line 36, in process_response
request.session.save()
File "\Python26\Lib\site-packages\django\contrib\sessions\backends\db.py", line 53, in save
session_data = self.encode(self._get_session(no_load=must_create)),
File "\Python26\Lib\site-packages\django\contrib\sessions\backends\base.py", line 88, in encode
pickled = pickle.dumps(session_dict, pickle.HIGHEST_PROTOCOL)
PicklingError: Can't pickle <type 'cStringIO.StringO'>: attribute lookup cStringIO.StringO failed
我GOOGLE了一個答案,但一無所獲有趣。任何解決方法?
如果您可以發佈您的代碼,這將是有幫助的! – 2010-09-04 11:57:39