Error running WSGI application: ModuleNotFoundError: No module named '_overlapped'
Error running WSGI application: ModuleNotFoundError: No module named '_overlapped'
我坚持这个问题。我不知道我该怎么办。我的错误引发了关于 WSGI 的错误。当我看到错误日志时,它正在使用我的本地服务器,但在实时
上出现问题
2022-02-23 18:47:32,893: Error running WSGI application
2022-02-23 18:47:32,910: ModuleNotFoundError: No module named '_overlapped'
2022-02-23 18:47:32,910: File "/var/www/lrnglobal_pythonanywhere_com_wsgi.py", line 17, in <module>
2022-02-23 18:47:32,910: application = get_wsgi_application()
2022-02-23 18:47:32,910:
2022-02-23 18:47:32,910: File "/home/lrnglobal/.virtualenvs/mysite-virtualenv/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2022-02-23 18:47:32,910: django.setup(set_prefix=False)
2022-02-23 18:47:32,910:
2022-02-23 18:47:32,910: File "/home/lrnglobal/.virtualenvs/mysite-virtualenv/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
2022-02-23 18:47:32,910: apps.populate(settings.INSTALLED_APPS)
2022-02-23 18:47:32,911:
2022-02-23 18:47:32,911: File "/home/lrnglobal/.virtualenvs/mysite-virtualenv/lib/python3.9/site-packages/django/apps/registry.py", line 114, in populate
2022-02-23 18:47:32,911: app_config.import_models()
2022-02-23 18:47:32,911:
2022-02-23 18:47:32,911: File "/home/lrnglobal/.virtualenvs/mysite-virtualenv/lib/python3.9/site-packages/django/apps/config.py", line 301, in import_models
2022-02-23 18:47:32,911: self.models_module = import_module(models_module_name)
2022-02-23 18:47:32,911:
2022-02-23 18:47:32,911: File "/home/lrnglobal/portal/lrnadmin/models.py", line 1, in <module>
2022-02-23 18:47:32,911: from asyncio.windows_events import NULL
2022-02-23 18:47:32,911:
2022-02-23 18:47:32,911: File "/usr/local/lib/python3.9/asyncio/windows_events.py", line 3, in <module>
2022-02-23 18:47:32,911: import _overlapped
2022-02-23 18:47:32,911: ***************************************************
2022-02-23 18:47:32,912: If you're seeing an import error and don't know why,
2022-02-23 18:47:32,912: we have a dedicated help page to help you debug:
2022-02-23 18:47:32,912: https://help.pythonanywhere.com/pages/DebuggingImportError/
2022-02-23 18:47:32,912:
这是我的工作目录
这是我的 wsgi 文件,它似乎是正确的
import os
import sys
path = '/home/lrnglobal/portal'
if path not in sys.path:
sys.path.insert(0, path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'portal.settings'
## Uncomment the lines below depending on your Django version
###### then, for Django >=1.5:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
###### or, for older Django <=1.4
即使我在控制台上执行代码,如迁移,它也会给我同样的错误,我认为问题出在虚拟环境中,但我不知道我删除并重新创建的问题是什么,但没有好消息
为此你需要两个模块..robotframework 和 trollius
pip install trollius
pip install robotframework
Windows 像 asyncio.windows_events 这样的特定模块将无法在 PythonAnywhere 上运行,因为它不是基于 Windows。
我坚持这个问题。我不知道我该怎么办。我的错误引发了关于 WSGI 的错误。当我看到错误日志时,它正在使用我的本地服务器,但在实时
上出现问题2022-02-23 18:47:32,893: Error running WSGI application
2022-02-23 18:47:32,910: ModuleNotFoundError: No module named '_overlapped'
2022-02-23 18:47:32,910: File "/var/www/lrnglobal_pythonanywhere_com_wsgi.py", line 17, in <module>
2022-02-23 18:47:32,910: application = get_wsgi_application()
2022-02-23 18:47:32,910:
2022-02-23 18:47:32,910: File "/home/lrnglobal/.virtualenvs/mysite-virtualenv/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2022-02-23 18:47:32,910: django.setup(set_prefix=False)
2022-02-23 18:47:32,910:
2022-02-23 18:47:32,910: File "/home/lrnglobal/.virtualenvs/mysite-virtualenv/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
2022-02-23 18:47:32,910: apps.populate(settings.INSTALLED_APPS)
2022-02-23 18:47:32,911:
2022-02-23 18:47:32,911: File "/home/lrnglobal/.virtualenvs/mysite-virtualenv/lib/python3.9/site-packages/django/apps/registry.py", line 114, in populate
2022-02-23 18:47:32,911: app_config.import_models()
2022-02-23 18:47:32,911:
2022-02-23 18:47:32,911: File "/home/lrnglobal/.virtualenvs/mysite-virtualenv/lib/python3.9/site-packages/django/apps/config.py", line 301, in import_models
2022-02-23 18:47:32,911: self.models_module = import_module(models_module_name)
2022-02-23 18:47:32,911:
2022-02-23 18:47:32,911: File "/home/lrnglobal/portal/lrnadmin/models.py", line 1, in <module>
2022-02-23 18:47:32,911: from asyncio.windows_events import NULL
2022-02-23 18:47:32,911:
2022-02-23 18:47:32,911: File "/usr/local/lib/python3.9/asyncio/windows_events.py", line 3, in <module>
2022-02-23 18:47:32,911: import _overlapped
2022-02-23 18:47:32,911: ***************************************************
2022-02-23 18:47:32,912: If you're seeing an import error and don't know why,
2022-02-23 18:47:32,912: we have a dedicated help page to help you debug:
2022-02-23 18:47:32,912: https://help.pythonanywhere.com/pages/DebuggingImportError/
2022-02-23 18:47:32,912:
这是我的工作目录
这是我的 wsgi 文件,它似乎是正确的
import os
import sys
path = '/home/lrnglobal/portal'
if path not in sys.path:
sys.path.insert(0, path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'portal.settings'
## Uncomment the lines below depending on your Django version
###### then, for Django >=1.5:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
###### or, for older Django <=1.4
即使我在控制台上执行代码,如迁移,它也会给我同样的错误,我认为问题出在虚拟环境中,但我不知道我删除并重新创建的问题是什么,但没有好消息
为此你需要两个模块..robotframework 和 trollius
pip install trollius
pip install robotframework
Windows 像 asyncio.windows_events 这样的特定模块将无法在 PythonAnywhere 上运行,因为它不是基于 Windows。