Open f754699 opened 4 months ago
from sanic import Sanic, text, json
app = Sanic("fuwu")
if __name__ == '__main__':
app.run(host="0.0.0.0", port=8000)
Setting the correct host name seems to address the issue. But we might want to implement a host name validator to avoid confusing error message.
把host
里的,
改为.
即可解决问题。同时建议在Linux或Unix系统上尝试
This is still a bug, however. mixins.startup.serve
should still exit gracefully—fixed in my PR.
Is there an existing issue for this?
Describe the bug
Code snippet
Expected Behavior
启动就报错,
How do you run Sanic?
as a model
Operating System
Windows
Sanic Version
sanic = {extras = ["ext"], version = "^24.6.0"}
Additional context
No response