InternalError:上传Photo Userena

时间:2013-02-06 21:15:47

标签: django image upload

尝试使用默认的Django Userena安装和包含的模板更改用户的个人资料照片时,我遇到了这个奇怪的错误:

InternalError at /accounts/SiteUser/edit/
current transaction is aborted, commands ignored until end of transaction block

Traceback:
File "/lib/python2.7/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/lib/python2.7/userena/decorators.py" in _wrapped_view
  28.         return view_func(request, *args, **kwargs)
File "/lib/python2.7/guardian/decorators.py" in _wrapped_view
  103.             return view_func(request, *args, **kwargs)
File "/lib/python2.7/userena/views.py" in profile_edit
  572.             profile = form.save()
File "/lib/python2.7/userena/forms.py" in save
  232.         profile = super(EditProfileForm, self).save(commit=commit)
File "/lib/python2.7/django/forms/models.py" in save
  364.                              fail_message, commit, construct=False)
File "/lib/python2.7/django/forms/models.py" in save_instance
  86.         instance.save()
File "/lib/python2.7/django/db/models/base.py" in save
  463.         self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/lib/python2.7/django/db/models/base.py" in save_base
  527.                         values = [(f, None, (raw and getattr(self, f.attname) or f.pre_save(self, False))) for f in non_pks]
File "/lib/python2.7/django/db/models/fields/files.py" in pre_save
  249.             file.save(file.name, file, save=False)
File "/lib/python2.7/easy_thumbnails/files.py" in save
  585.                                                     **kwargs)
File "/lib/python2.7/easy_thumbnails/files.py" in save
  506.         self.get_source_cache(create=True, update=True)
File "/lib/python2.7/easy_thumbnails/files.py" in get_source_cache
  443.             check_cache_miss=self.thumbnail_check_cache_miss)
File "/lib/python2.7/easy_thumbnails/models.py" in get_file
  16.             object, created = self.get_or_create(**kwargs)
File "/lib/python2.7/django/db/models/manager.py" in get_or_create
  134.         return self.get_query_set().get_or_create(**kwargs)
File "/lib/python2.7/django/db/models/query.py" in get_or_create
  445.             return self.get(**lookup), False
File "/lib/python2.7/django/db/models/query.py" in get
  361.         num = len(clone)
File "/lib/python2.7/django/db/models/query.py" in __len__
  85.                 self._result_cache = list(self.iterator())
File "/lib/python2.7/django/db/models/query.py" in iterator
  291.         for row in compiler.results_iter():
File "/lib/python2.7/django/db/models/sql/compiler.py" in results_iter
  763.         for rows in self.execute_sql(MULTI):
File "/lib/python2.7/django/db/models/sql/compiler.py" in execute_sql
  818.         cursor.execute(sql, params)

Exception Type: InternalError at /accounts/SiteUser/edit/
Exception Value: current transaction is aborted, commands ignored until end of transaction block

您是否遇到过这样的问题?我尝试将USERENA_MUGSHOT_PATH设置为其他文件夹,但仍然没有。其他表单字段可由用户编辑,因此它似乎只是图像上载的问题。谢谢你的任何想法!

0 个答案:

没有答案