Can't run server
Closed this issue · 2 comments
Hi,
when i run python run.py
i receive the following error:
Traceback (most recent call last):
File "run.py", line 20, in
app.run(host=str(host), port=int(port))
File "/usr/local/lib/python2.7/dist-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 772, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.11.11-py2.7.egg/werkzeug/serving.py", line 694, in run_simple
inner()
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.11.11-py2.7.egg/werkzeug/serving.py", line 656, in inner
fd=fd)
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.11.11-py2.7.egg/werkzeug/serving.py", line 550, in make_server
passthrough_errors, ssl_context, fd=fd)
File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.11.11-py2.7.egg/werkzeug/serving.py", line 464, in init
HTTPServer.init(self, (host, int(port)), handler)
File "/usr/lib/python2.7/SocketServer.py", line 417, in init
self.server_bind()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/usr/lib/python2.7/SocketServer.py", line 431, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
I tried different host port configurations but nothing seems to work. Any suggestions?
Edit
OS: Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-47-generic x86_64)
Python: 2.7.12
If you need more information let me know
Thanks in advance
Hello @michaelpetri
Can you give me the result of this command:
$ pip freeze
I am not sure to see the error message, can you give us the entire traceback pls ?
Thanks
File "/usr/bin/pip", line 11, in
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/pip/init.py", line 215, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python2.7/locale.py", line 581, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
Thanks for this hint, now i was able to fix the problem by setting up my locale settings.
Things i've done:
sudo locale-gen en_US.UTF-8
(Not sure if this was necessary)
export LC_ALL=C
If you have any additions please let me and others know.
Thanks