使用flask run启动能成功,访问http://127.0.0.1:5000/报错:
ValueError
ValueError: path is on mount 'e:', start on mount 'c:'
Traceback (most recent call last)
File "C:\Users\wangxufei\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Users\wangxufei\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\wangxufei\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\wangxufei\AppData\Local\Programs\Python\Python38\Lib\site-packages\flask\_compat.py", line 39, in reraise
Open an interactive python shell in this frameraise value
@mkg 现在似乎创建了虚拟环境,现在flask run启动后,访问报错有变化,
flask.cli.NoAppException: While importing "main", an ImportError was raised:
Traceback (most recent call last):
File "C:\Users\wangxufei\Anaconda3\lib\site-packages\flask\cli.py", line 240, in locate_app
__import__(module_name)
File "C:\Users\wangxufei\PycharmProjects\pear-admin-flask\main.py", line 2, in <module>
from flask_uploads import configure_uploads, patch_request_class
File "C:\Users\wangxufei\Anaconda3\lib\site-packages\flask_uploads.py", line 26, in <module>
from werkzeug import secure_filename, FileStorage
ImportError: cannot import name 'secure_filename' from 'werkzeug' (C:\Users\wangxufei\Anaconda3\lib\site-packages\werkzeug\__init__.py)