每当我想运行烧瓶时,即使没有打开任何浏览器,也会显示以下错误

我想要以下错误的解决方案:


(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: off

Traceback (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(


三国纷争
浏览 96回答 1
1回答

宝慕林4294392

您再次使用 Flask 应用程序的端口。这就是发生此错误的原因。您可以停止项目并从编辑器中再次运行它。此外,这对您也不起作用,那么您可以使用以下命令:&nbsp;lsof -i:<port_number>&nbsp;kill -9 <pid>
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python