parsemail.sh failed

Finucane, Stephen stephen.finucane at intel.com
Mon Jun 27 23:24:28 AEST 2016


On 27 Jun 21:21, WEN Pingbo wrote:
> Hi,
> 
> I got an error when importing some email to patchwork.
> 
> Command: cat ~/mail/mail.0P8xgrB1UW | ./patchwork/bin/parsemail.sh
> 
> Output:
>   File "/opt/patchwork/patchwork/bin/parsemail.py", line 39, in <module>
>     from django.contrib.auth.models import User
>   File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/models.py",
> line 4, in <module>
>     from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
>   File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/base_user.py",
> line 49, in <module>
>     class AbstractBaseUser(models.Model):
>   File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py",
> line 94, in __new__
>     app_config = apps.get_containing_app_config(module)
>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py",
> line 239, in get_containing_app_config
>     self.check_apps_ready()
>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py",
> line 124, in check_apps_ready
>     raise AppRegistryNotReady("Apps aren't loaded yet.")
> django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
> 
> Even I add django.setup() before 'import User', still got some errors:
> 
>   File "/opt/patchwork/patchwork/models.py", line 28, in <module>
>     from django.contrib.auth.models import User
> ImportError: cannot import name User
> 
> Is my parsemail.sh used correctly? Or need some extra settings?

Could you try using Django < 1.10? This version is not yet supported,
and Django 1.8 is recommended. This should resolve this issue.

Stephen


More information about the Patchwork mailing list