parsemail.sh failed
WEN Pingbo
wengpingbo at gmail.com
Mon Jun 27 23:21:21 AEST 2016
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?
B.R.
Pingbo
More information about the Patchwork
mailing list