Error when trying to export to Migaku Memory (Migaku SRS)
-
When using the Import from Anki feature on study.migaku.io, the transfer stops at about 48% and gives me this error.
Debug info: Anki 2.1.63 (f356f177) Python 3.9.15 Qt 5.15.2 PyQt 5.15.5 Platform: Windows-10-10.0.22621 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2023-05-27 16:30:09 ERROR:tornado.application:Uncaught exception POST /srs-import (127.0.0.1) HTTPServerRequest(protocol='http', host='127.0.0.1:44432', method='POST', uri='/srs-import', version='HTTP/1.1', remote_ip='127.0.0.1') Traceback (most recent call last): File "urllib3.connection", line 174, in _new_conn File "urllib3.util.connection", line 72, in create_connection File "socket", line 954, in getaddrinfo socket.gaierror: [Errno 11001] getaddrinfo failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "urllib3.connectionpool", line 703, in urlopen File "urllib3.connectionpool", line 386, in _make_request File "urllib3.connectionpool", line 1042, in _validate_conn File "urllib3.connection", line 363, in connect File "urllib3.connection", line 186, in _new_conn urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000014994581100>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "requests.adapters", line 489, in send File "urllib3.connectionpool", line 787, in urlopen File "urllib3.util.retry", line 592, in increment urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.kannodesu.com', port=443): Max retries exceeded with url: /wp-content/uploads/imgs/1/c/1cb836c0-s.png (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000014994581100>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\lib\shared\tornado\web.py", line 1704, in _execute result = await result File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\migaku_connection\srs_import.py", line 310, in post media_cache = await srs_util.build_media_cache(media_gather, user_token) File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\migaku_connection\srs_util.py", line 311, in build_media_cache return await tornado.ioloop.IOLoop.current().run_in_executor(None, _build_media_cache, media, user_token) File "concurrent.futures.thread", line 58, in run File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\migaku_connection\srs_util.py", line 306, in _build_media_cache future.result() File "concurrent.futures._base", line 446, in result File "concurrent.futures._base", line 391, in __get_result File "concurrent.futures.thread", line 58, in run File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\migaku_connection\srs_util.py", line 297, in do_upload r[fname] = _upload_media(fname, user_token, is_audio) File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\migaku_connection\srs_util.py", line 281, in _upload_media raise e File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\migaku_connection\srs_util.py", line 275, in _upload_media return _upload_media_single_attempt(fname, user_token, is_audio) File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\migaku_connection\srs_util.py", line 210, in _upload_media_single_attempt r = request_retry('GET', fname, max_retries=2) File "C:\Users\JohnDoe\AppData\Roaming\Anki2\addons21\1846879528\migaku_connection\srs_util.py", line 151, in request_retry r = requests.request( File "requests.api", line 59, in request File "requests.sessions", line 587, in request File "requests.sessions", line 701, in send File "requests.adapters", line 565, in send requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.kannodesu.com', port=443): Max retries exceeded with url: /wp-content/uploads/imgs/1/c/1cb836c0-s.png (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000014994581100>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) ERROR:tornado.access:500 POST /srs-import (127.0.0.1) 6128.04ms
-
Fixed. The problem was a missing or corrupted picture on a card.
Notice my error has to do with a PNG file.
Max retries exceeded with url: /wp-content/uploads/imgs/1/c/1cb836c0-s.png
You can try 3 things to get it working.
In Anki, go to Tools > Check Media > Tag missing. Then go to the card browser and select "missing-media" from the sidebar under Tags. Check and delete missing pictures.
This wasn't enough for me. I had to do the following to check the pictures of the cards that were created after the last successfully uploaded card in Migaku Memory.
- Cancel the import on study.migaku.io after you get the error.
- Open the deck, check the top card that was able to be uploaded, and remember its term
- In Anki, go to the card browser, select the deck you are trying to upload on the sidebar
- Order the cards by Created Date and search for the top term (step 2) in the search bar
- Erase the term, and you should see that word in the browser with other cards that were created around the same time.
- Going from Create Date, look at the contents of the cards created after the term
- Check the Screenshot or Image fields for missing or corrupted images, and delete them
- Sync and try the import again in Migaku Memory
If that doesn't work, check your Anki media folder for images created at around the same time as the top card and check for a small file size like 1kb, and delete it if it's empty. I had one of those and the picture was a tiny dot.
-
I just updated to the Migaku Browser Add-On community release (before this update, the Migaku Memory website wouldn't let me start the import process because it said I didn't have the add-on).
I also updated the Anki Add-On today.