此应用程序在我的开发环境中运行良好,但是在我的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'
答案 0 :(得分:0)
此特定版本的Django(1.10.5
)一定存在问题,因为更新到1.10.8
似乎已解决了该问题。