When I study my Chinese deck, Anki crashes intermittently (about every 3~50cards), showing this error log:
Anki 23.12.1 (1a1d4d54)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-11.7.10-x86_64-i386-64bit
Socket error
Traceback (most recent call last):
File "waitress.channel", line 132, in _flush_exception
File "waitress.channel", line 270, in _flush_some
File "waitress.wasyncore", line 431, in send
OSError: [Errno 41] Protocol wrong type for socket
the crash only occurs when I press “Show Answer” or one of the answer buttons. I’ve already got through troubleshooting steps, but the problem remains.
After some googling, I noticed the situation is really alike with this post: (anki-crash-when-using-a-specific-deck/22266)
So I tried to open the debug console, but none of the suggested shortcuts(Command+Shift+‘;‘or’:‘or’+’) works.
I can’t help with the crash, but are you using a non-English keyboard layout? Try Cmd <whatever types : in your layout> or switch to an English layout to type the shortcut.
Thanks, that really helps! You’re right, I’m using Japanese keyboard layout. Command+‘:’ does the trick!
Now I can check if this snippet can make the error go away.
from errno import EPROTOTYPE
import waitress.wasyncore
waitress.wasyncore._DISCONNECTED = waitress.wasyncore._DISCONNECTED.union({EPROTOTYPE})