我不太确定这里出了什么问题,我已经在settings.py文件中添加了所有应用程序,使用manage.py等成功运行了迁移,但我一直收到此错误。 我在PyCharm 2017.2.2中运行了这个,我也没有在脚本中看到任何错误。似乎已安装所有必需的软件包。
下面是堆栈跟踪:
__import__(module)
from models import Token, Narrative
self = load(from_parent)
File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
File "C:\Python27\lib\pickle.py", line 1384, in load
__import__(module)
return Unpickler(file).load()
File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
from models import Token, Narrative
class Narrative(models.Model):
File "C:\Python27\lib\pickle.py", line 864, in load
return Unpickler(file).load()
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
File "C:\Python27\lib\pickle.py", line 864, in load
from models import Token, Narrative
dispatch[key](self)
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
class Narrative(models.Model):
app_config = apps.get_containing_app_config(module)
dispatch[key](self)
File "C:\Python27\lib\pickle.py", line 1096, in load_global
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
File "C:\Python27\lib\pickle.py", line 1096, in load_global
klass = self.find_class(module, name)
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
class Narrative(models.Model):
self.check_apps_ready()
klass = self.find_class(module, name)
File "C:\Python27\lib\pickle.py", line 1130, in find_class
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
File "C:\Python27\lib\pickle.py", line 1130, in find_class
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
app_config = apps.get_containing_app_config(module)
__import__(module)
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
raise AppRegistryNotReady("Apps aren't loaded yet.")
__import__(module)
app_config = apps.get_containing_app_config(module)
django.core.exceptions File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
self.check_apps_ready()
from models import Token, Narrative
. File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
AppRegistryNotReadyfrom models import Token, Narrative
self.check_apps_ready()
: File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
class Narrative(models.Model):
A django.core.exceptions File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
pps aren't loaded yet.class Narrative(models.Model):
raise AppRegistryNotReady("Apps aren't loaded yet.")
.
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
django.core.exceptionsAppRegistryNotReadyapp_config = apps.get_containing_app_config(module)
.: File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
app_config = apps.get_containing_app_config(module)
AppRegistryNotReadyA File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
: pps aren't loaded yet. self.check_apps_ready()
A
self.check_apps_ready()
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
pps aren't loaded yet. File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
Traceback (most recent call last):
raise AppRegistryNotReady("Apps aren't loaded yet.")
Traceback (most recent call last):
File "<string>", line 1, in <module>
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions File "<string>", line 1, in <module>
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
django.core.exceptions. File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
.AppRegistryNotReadyAppRegistryNotReadyself = load(from_parent)
: : File "C:\Python27\lib\pickle.py", line 1384, in load
self = load(from_parent)
AA File "C:\Python27\lib\pickle.py", line 1384, in load
Traceback (most recent call last):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in <module>
pps aren't loaded yet. pps aren't loaded yet.return Unpickler(file).load()
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
[26/Aug/2017 13:02:01] "GET /getStatus HTTP/1.1" 200 3
File "C:\Python27\lib\pickle.py", line 864, in load
return Unpickler(file).load()
self = load(from_parent)
File "C:\Python27\lib\pickle.py", line 864, in load
dispatch[key](self)
File "C:\Python27\lib\pickle.py", line 1384, in load
self = load(from_parent)
File "C:\Python27\lib\pickle.py", line 1096, in load_global
File "C:\Python27\lib\pickle.py", line 1384, in load
dispatch[key](self)
File "C:\Python27\lib\pickle.py", line 1096, in load_global
return Unpickler(file).load()
klass = self.find_class(module, name)
File "C:\Python27\lib\pickle.py", line 864, in load
File "C:\Python27\lib\pickle.py", line 1130, in find_class
return Unpickler(file).load()
File "C:\Python27\lib\pickle.py", line 864, in load
klass = self.find_class(module, name)
dispatch[key](self)
__import__(module)
File "C:\Python27\lib\pickle.py", line 1130, in find_class
File "C:\Python27\lib\pickle.py", line 1096, in load_global
File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
dispatch[key](self)
File "C:\Python27\lib\pickle.py", line 1096, in load_global
__import__(module)
klass = self.find_class(module, name)
File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
from models import Token, Narrative
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
Traceback (most recent call last):
klass = self.find_class(module, name)
File "C:\Python27\lib\pickle.py", line 1130, in find_class
File "<string>", line 1, in <module>
from models import Token, Narrative
File "C:\Python27\lib\pickle.py", line 1130, in find_class
class Narrative(models.Model):
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
__import__(module)
class Narrative(models.Model):
File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
__import__(module)
self = load(from_parent)
app_config = apps.get_containing_app_config(module)
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
File "C:\Python27\lib\pickle.py", line 1384, in load
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
from models import Token, Narrative
app_config = apps.get_containing_app_config(module)
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
from models import Token, Narrative
self.check_apps_ready()
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
class Narrative(models.Model):
self.check_apps_ready()
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
class Narrative(models.Model):
raise AppRegistryNotReady("Apps aren't loaded yet.")
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
django.core.exceptions app_config = apps.get_containing_app_config(module)
.return Unpickler(file).load()
raise AppRegistryNotReady("Apps aren't loaded yet.")
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
AppRegistryNotReadyapp_config = apps.get_containing_app_config(module)
File "C:\Python27\lib\pickle.py", line 864, in load
django.core.exceptions: File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
.A self.check_apps_ready()
AppRegistryNotReadypps aren't loaded yet.self.check_apps_ready()
: File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
A pps aren't loaded yet.dispatch[key](self)
raise AppRegistryNotReady("Apps aren't loaded yet.")
File "C:\Python27\lib\pickle.py", line 1096, in load_global
django.core.exceptions .raise AppRegistryNotReady("Apps aren't loaded yet.")
klass = self.find_class(module, name)
AppRegistryNotReadydjango.core.exceptions File "C:\Python27\lib\pickle.py", line 1130, in find_class
: . AAppRegistryNotReady__import__(module)
pps aren't loaded yet.: File "C:\Users\moham\Downloads\GQP Project\final\app1\tokenization.py", line 34, in <module>
A pps aren't loaded yet.from models import Token, Narrative
File "C:\Users\moham\Downloads\GQP Project\final\app1\models.py", line 27, in <module>
class Narrative(models.Model):
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 110, in __new__
app_config = apps.get_containing_app_config(module)
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
self.check_apps_ready()
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
Traceback (most recent call last):
Traceback (most recent call last):
self = load(from_parent)
File "<string>", line 1, in <module>
Traceback (most recent call last):
File "<string>", line 1, in <module>
Traceback (most recent call last):
File "C:\Python27\lib\pickle.py", line 1384, in load
Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
File "<string>", line 1, in <module>
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
File "<string>", line 1, in <module>
File "<string>", line 1, in <module>
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 381, in main