-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Pretty new to all this, so sorry if I overlooked anything basic.
Hit sync on the Anki Desktop v23.12.1, typed in the user/password that I set from ./ankisyncctl.py, and got the error: AnkiWeb encountered a problem. Please try again in a few minutes.. Then opened up the Docker container logs and see this:
2023-12-29 15:41:39 [2023-12-29 21:41:39,240]:INFO:ankisyncd:ankisyncd [unknown version] (https://github.com/ankicommunity/anki-sync-server.git)
2023-12-29 15:41:39 [2023-12-29 21:41:39,240]:INFO:ankisyncd.config:Loaded config from /ankisyncd.conf
2023-12-29 15:41:39 [2023-12-29 21:41:39,240]:INFO:ankisyncd.users:Found auth_db_path in config, using SqliteUserManager for auth
2023-12-29 15:41:39 [2023-12-29 21:41:39,240]:INFO:ankisyncd.sessions:Found session_db_path in config, using SqliteSessionManager for auth
2023-12-29 15:41:39 [2023-12-29 21:41:39,241]:INFO:ankisyncd.server:Serving HTTP on 0.0.0.0 port 27701...
2023-12-29 15:43:49 Traceback (most recent call last):
2023-12-29 15:43:49 File "/usr/local/lib/python3.10/wsgiref/handlers.py", line 137, in run
2023-12-29 15:43:49 self.result = application(self.environ, self.start_response)
2023-12-29 15:43:49 File "/ankisyncd/sync_app.py", line 585, in call
2023-12-29 15:43:49 w = self.wrapped(*args, **kwargs)
2023-12-29 15:43:49 File "/ankisyncd/sync_app.py", line 686, in call
2023-12-29 15:43:49 req.params = req.parse
2023-12-29 15:43:49 File "/ankisyncd/sync_app.py", line 508, in parse
2023-12-29 15:43:49 boundary = others[0]
2023-12-29 15:43:49 IndexError: list index out of range
2023-12-29 15:43:49 [2023-12-29 21:43:49,430]:INFO:ankisyncd.http:172.17.0.1 "POST /sync/hostKey HTTP/1.1" 500 59
Here's all the steps I took:
- Cloned the repo into VS Code.
- Updated the Dockerfile.
- Added
RUN apt-get update && \ apt-get install dos2unix && \ apt-get cleanafterRUN cd /src \ && pip install -r requirements.txt \ && pip install -e .. (was getting/usr/bin/env: ‘python3\r’: No such file or directoryerror when running ankisyncctl.py in the container). - Added
EXPOSE 27701beforeCMD ["python", "-m", "ankisyncd"]. (Docker wasn't showing anything in the Port(s) section of the container).
- Built image from Dockerfile.
- Ran a new container from the image with Host Port 27701. (Docker now shows
27701:27701in the Port(s) section). - Ran
dos2unix ./ankisyncd_cli/ankisyncctl.pyinside the container. - Ran
./ankisyncd_cli/ankisyncctl.py adduser TMasoninside the container and then entered a password when prompted. - In Anki Desktop, I went to Tools > Preferences > Syncing and set Self-hosted sync server to
http://localhost:27701/. (The custom sync server redirector addon mentioned in the README wouldn't connect to the sever for me (no logs in the Docker container)).