我想要以下错误的解决方案:(venflask) sgiri@sgiri-Latitude-3580:~/NewEnv$ flask run * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: offTraceback (most recent call last): File "/home/sgiri/NewEnv/venflask/bin/flask", line 10, in <module> sys.exit(main()) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/flask/cli.py", line 966, in main cli.main(prog_name="python -m flask" if as_module else None) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/flask/cli.py", line 586, in main return super(FlaskGroup, self).main(*args, **kwargs) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/home/sgiri/NewEnv/venflask/lib/python3.8/site-packages/flask/cli.py", line 852, in run_command run_simple(
1 回答
宝慕林4294392
TA贡献2021条经验 获得超8个赞
您再次使用 Flask 应用程序的端口。这就是发生此错误的原因。您可以停止项目并从编辑器中再次运行它。
此外,这对您也不起作用,那么您可以使用以下命令:
lsof -i:<port_number>
kill -9 <pid>
添加回答
举报
0/150
提交
取消