I opened an issue on https://github.com/Pylons/waitress/issues/312 (ValueError: Requires an IP to get the server name) asking for help.
@whome, what is your operating system? Linux?
Can you run a Python Script to help debugging the problem?
If you do not have Python installed, you can install it from https://www.python.org/downloads/
You would need to create a text file named test.py
with the contents:
import os
import flask
from waitress.server import create_server
app = flask.Flask(__name__)
desired_port = int(os.getenv("ANKI_API_PORT", "0"))
server = create_server(app, host="127.0.0.1", port=desired_port)
print("Serving on http://%s:%s"% (server.effective_host, server.effective_port))
After creating the test.py
file, you can open a command line and run it with the command python test.py
or python3 test.py
After running the script, you should have an output like the following:
Serving on http://<your-computer-name>:56008
Or it could show you the same error:
Traceback (most recent call last):
File "test.py", line 8, in <module>
server = create_server(app, host="127.0.0.1", port=desired_port)
File "waitress\server.py", line 81, in create_server
last_serv = TcpWSGIServer(
File "waitress\server.py", line 242, in __init__
self.server_name = self.get_server_name(None)
File "waitress\server.py", line 254, in get_server_name
raise ValueError("Requires an IP to get the server name")
ValueError: Requires an IP to get the server name