【问题标题】:Running python flask application on repl gives error在 repl 上运行 python flask 应用程序会出错
【发布时间】:2021-11-22 04:39:43
【问题描述】:

我正在 replit 中运行一个 python 烧瓶应用程序,当它尝试访问 url 时,我收到以下消息

  Hmmmm.... We Couldn't Reach Your Repl Make sure your repl has a port open and is ready to receive HTTP traffic.

如何解决这个错误

【问题讨论】:

  • 尝试将host=0.0.0.0 添加到您的app.run() 或类似电话中。也与我们分享您的回复。
  • 已将主机添加到 app.run()。我怎样才能分享repl。我是新手
  • 添加了截图

标签: python flask repl.it


【解决方案1】:

您可能正在使用的端口上运行烧瓶服务器。 尝试设置不同的端口:

app.run(host='0.0.0.0', port=8080)

flask run --host=0.0.0.0 --port=8080

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-05
    • 1970-01-01
    • 2021-10-18
    • 1970-01-01
    • 2014-04-30
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多