ImportError: No module named 'django.contrib.sessions'
ImportError: No module named 'django.contrib.sessions'
此应用程序在我的开发环境中运行良好,但在我的 PythonAnywhere 实例中似乎存在 Django 问题。知道是什么原因造成的吗?
Traceback (most recent call last):
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/apps/config.py", line 118, in create
cls = getattr(mod, cls_name)
AttributeError: module 'django.contrib' has no attribute 'sessions'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 341, in execute
django.setup()
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/apps/config.py", line 123, in create
import_module(entry)
File "/home/cvcexport/genius/genius/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'django.contrib.sessions'
这一定是这个特定版本的 Django (1.10.5
) 的问题,因为更新到 1.10.8
似乎已经解决了它。
此应用程序在我的开发环境中运行良好,但在我的 PythonAnywhere 实例中似乎存在 Django 问题。知道是什么原因造成的吗?
Traceback (most recent call last):
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/apps/config.py", line 118, in create
cls = getattr(mod, cls_name)
AttributeError: module 'django.contrib' has no attribute 'sessions'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 341, in execute
django.setup()
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/cvcexport/genius/genius/local/lib/python3.5/site-packages/django/apps/config.py", line 123, in create
import_module(entry)
File "/home/cvcexport/genius/genius/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'django.contrib.sessions'
这一定是这个特定版本的 Django (1.10.5
) 的问题,因为更新到 1.10.8
似乎已经解决了它。