我目前遇到流浪汉问题。我以前用它做了很多任务,但现在当我做流浪汉然后流浪汉ssh时,一切似乎都运转正常。然后我导航到vagrant文件夹运行python文件,当我运行它时,我收到以下错误:
vagrant@vagrant:/vagrant$ python project.py
Traceback (most recent call last):
File "project.py", line 75, in
app.run(host='0.0.0.0.', port=8080)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 841, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 720,
in run_simple
s.bind((hostname, port))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -2] Name or service not known
我多次尝试重启流浪汉,我也试过流浪汉破坏并重新启动过程。我手动删除并关闭了几次电源,但我总是遇到同样的错误。我将不胜感激任何帮助。谢谢。
答案 0 :(得分:0)
问题不是流浪汉...堆栈跟踪中的这一行显示你的python脚本中可能有拼写错误
app.run(host='0.0.0.0.', port=8080)
应该是
app.run(host='0.0.0.0', port=8080)