# Anki 2.33 Will Not Start

**URL:** <https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882>\
**Category:** Help\
**Created:** [August 31, 2020, 8:12pm UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882 "2020-08-31T20:12:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![whome](https://avatars.discourse-cdn.com/v4/letter/w/41988e/32.png) [@whome](https://forums.ankiweb.net/u/whome)\
**Post date:** [August 31, 2020, 8:12pm UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/1 "2020-08-31T20:12:19Z")

</div>

I’m trying to run 2.33 and get this error message on the Anki Console

Exception in thread Thread-1:  
Traceback (most recent call last):  
File “threading.py”, line 932, in \_bootstrap\_inner  
File “aqt\mediasrv.py”, line 63, in run  
File “waitress\server.py”, line 81, in create\_server  
File “waitress\server.py”, line 242, in **init**  
File “waitress\server.py”, line 254, in get\_server\_name  
ValueError: Requires an IP to get the server name  
mpv too old for key rebinding

The last working version for me is 2.26

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [August 31, 2020, 11:40pm UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/2 "2020-08-31T23:40:52Z")

</div>

What is your computer’s network hostname set to?

@addons_zz any ideas?

---

<div class="post-metadata">

**Author:** ![whome](https://avatars.discourse-cdn.com/v4/letter/w/41988e/32.png) [@whome](https://forums.ankiweb.net/u/whome)\
**Post date:** [September 1, 2020, 8:26pm UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/3 "2020-09-01T20:26:56Z")

</div>

Hostname: Desktop-7ZAAFP

---

<div class="post-metadata">

**Author:** ![addons\_zz](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/addons_zz/32/43_2.png) [@addons\_zz](https://forums.ankiweb.net/u/addons_zz)\
**Post date:** [September 2, 2020, 12:13am UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/4 "2020-09-02T00:13:51Z")

</div>

I opened an issue on [https://github.com/Pylons/waitress/issues/312](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/](https://www.python.org/downloads/)

You would need to create a text file named **`test.py`** with the contents:

```python
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:

```auto
Serving on http://<your-computer-name>:56008

```

Or it could show you the same error:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![whome](https://avatars.discourse-cdn.com/v4/letter/w/41988e/32.png) [@whome](https://forums.ankiweb.net/u/whome)\
**Post date:** [September 2, 2020, 12:31am UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/5 "2020-09-02T00:31:50Z")

</div>

Windows 10, I’m getting the following error with the Python script.

ModuleNotFoundError: No module named ‘flask’

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [September 2, 2020, 11:27am UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/6 "2020-09-02T11:27:19Z")

</div>

You’ll need to “pip install flask” first

What’s the contents of your hosts file?

> **[How to Edit Your Hosts File on Windows, Mac, or Linux](https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/)**
>
> On occasion you will need to edit the hosts file on your machine. Sometimes because of an attack or prank, and others so that you can simply and freely control access to websites and network traffic.

---

<div class="post-metadata">

**Author:** ![whome](https://avatars.discourse-cdn.com/v4/letter/w/41988e/32.png) [@whome](https://forums.ankiweb.net/u/whome)\
**Post date:** [September 2, 2020, 11:51am UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/7 "2020-09-02T11:51:54Z")

</div>

It is related to the Hostfile!

With a Hostfile that says "127.0.0.1 "

Traceback (most recent call last):  
File “…\test.py”, line 8, in   
server = create\_server(app, host=“127.0.0.1”, port=desired\_port)  
File “…\Python38-32\lib\site-packages\waitress\server.py”, line 81, in create\_server  
last\_serv = TcpWSGIServer(  
File “…\Python38-32\lib\site-packages\waitress\server.py”, line 242, in **init**  
self.server\_name = self.get\_server\_name(self.effective\_host)  
File “…\Python38-32\lib\site-packages\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

With a Blank hostfile  
Serving on http://DESKTOP-…:59385

With a Hostfile with a site blocked  
Serving on [site]:59786

It seems that Waitress may not be reading the hostfile properly. I wonder why it worked in 2.2.26?

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [September 2, 2020, 12:11pm UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/8 "2020-09-02T12:11:27Z")

</div>

To confirm, the hostname was missing - the line just said "127.0.0.1 " with nothing else on that line? That does not look valid - it should have have a hostname after it.

---

<div class="post-metadata">

**Author:** ![whome](https://avatars.discourse-cdn.com/v4/letter/w/41988e/32.png) [@whome](https://forums.ankiweb.net/u/whome)\
**Post date:** [September 2, 2020, 12:18pm UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/9 "2020-09-02T12:18:52Z")

</div>

Yes, that one was missing the hostname. When it does have a hostname, it says Serving on Hostname:59786 . It seems that Waitress is doing the following

1. Read the Hosts file
2. Find the first entry that says 127.0.0.1 Hostname
3. Set Server to Hostname  
4)Which fails if Hostame is either blank or a site.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [September 3, 2020, 12:05am UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/10 "2020-09-03T00:05:25Z")

</div>

Thanks for clarifying, I’ve posted an update on the ticket @addons_zz created.

---

<div class="post-metadata">

**Author:** ![whome](https://avatars.discourse-cdn.com/v4/letter/w/41988e/32.png) [@whome](https://forums.ankiweb.net/u/whome)\
**Post date:** [January 24, 2021, 4:51pm UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/11 "2021-01-24T16:51:28Z")

</div>

Confirmed - Fixed

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 5:16am UTC](https://forums.ankiweb.net/t/anki-2-33-will-not-start/2882/12 "2023-05-01T05:16:33Z")

</div>


