Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

运行docker后,访问ip:端口后报错,解决办法 #22

Open
wooluo opened this issue Jul 26, 2021 · 1 comment
Open

运行docker后,访问ip:端口后报错,解决办法 #22

wooluo opened this issue Jul 26, 2021 · 1 comment

Comments

@wooluo
Copy link

wooluo commented Jul 26, 2021

按照说明,使用docker启动系统后,发现报错:
flask.cli.NoAppException
flask.cli.NoAppException: While importing "flaskr", an ImportError was raised:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/flask/cli.py", line 240, in locate_app
import(module_name)
File "/DBJ/flaskr/init.py", line 6, in
from .import admin
File "/DBJ/flaskr/admin.py", line 20, in
import dns.resolver #DNS解析
ModuleNotFoundError: No module named 'dns'
发现缺少dns模块……
那么就自己加了一下,在requirements.txt文件中,添加一行
dnspython==2.1.0
重新生成个镜像,然后启动吧,就可以正常使用了,应该是开发者忘记了,添加上吧

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@wooluo and others