Comments (6)
Hi @MacKenia,
It looks like this line here is causing the issue for you:
I've not seen this error before and it looks like AnkiDesktop version 2.1.65
was released on 21st May 2023. I wonder if there's a change in the latest release that breaks our syncing or if it's just a issue that we've missed.
My AnkiDesktop is a bit older so I'll try and update it to see if I can reproduce this issue.
If anyone else has gotten AnkiDesktop 2.1.65 working, please let me know.
In the meantime, I don't know your background but would you know how to add a print statement in the code to better understand what is causing that line to break?
from ankicommunity-sync-server.
I feel like this issue might be related to this issue: #158.
There seems to be a new sync protocol that this server doesn't support yet. So I would suggest either using a AnkiDesktop version before 2.1.57 to see if that fixes your issue.
The issue above also linked to the new official sync server which might interest you.
Let me know what you end up doing while I try to investigate this further.
from ankicommunity-sync-server.
You can try the built-in sync server - https://docs.ankiweb.net/sync-server.html
from ankicommunity-sync-server.
@sarsamurmu Thanks, It really solve my problem!
from ankicommunity-sync-server.
Thanks for your reply.
I add this line above the position you told me and I try again I receive this log:
repeat:b'(\xb5/\xfd\x00X\xcd\x00\x00\x98{"u":"mackenia","p}\x01\x00\x84\x9ba'
body:b'(\xb5/\xfd\x00X\xcd\x00\x00\x98{"u":"mackenia","p}\x01\x00\x84\x9ba'
Traceback (most recent call last):
File "/usr/lib/python3.10/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/home/asus/anki-sync-server/src/ankisyncd/sync_app.py", line 586, in __call__
w = self.__wrapped__(*args, **kwargs)
File "/home/asus/anki-sync-server/src/ankisyncd/sync_app.py", line 687, in __call__
req.params = req.parse
File "/home/asus/anki-sync-server/src/ankisyncd/sync_app.py", line 537, in parse
items = re.split(repeat, body)
File "/usr/lib/python3.10/re.py", line 230, in split
return _compile(pattern, flags).split(string, maxsplit)
File "/usr/lib/python3.10/re.py", line 303, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python3.10/sre_compile.py", line 788, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib/python3.10/sre_parse.py", line 955, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/lib/python3.10/sre_parse.py", line 444, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
File "/usr/lib/python3.10/sre_parse.py", line 843, in _parse
raise source.error("missing ), unterminated subpattern",
re.error: missing ), unterminated subpattern at position 0
[2023-07-20 22:10:11,100]:INFO:ankisyncd.http:127.0.0.1 "POST /sync/hostKey HTTP/1.1" 500 59
The Code i add:
print(f"repeat:{repeat}\nbody:{body}") # <<< ADD HERE
items = re.split(repeat, body)
This is a piece of ankiDroid's sync log:
repeat:b'--Anki-sync-boundary'
body:b'--Anki-sync-boundary\r\nContent-Disposition: form-data; name="v"\r\n\r\nankidroid,2.15.6,android:13:MI 9\r\n--Anki-sync-boundary\r\nContent-Disposition: form-data; name="k"\r\n\r\n03ea215ee842558c1e74239c0948fb41\r\n--Anki-sync-boundary\r\nContent-Disposition: form-data; name="c"\r\n\r\n1\r\n--Anki-sync-boundary\r\nContent-Disposition: form-data; name="data"; filename="data"\r\nContent-Type: application/octet-stream\r\n\r\n\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x00\xab\xae\x05\x00C\xbf\xa6\xa3\x02\x00\x00\x00\r\n--Anki-sync-boundary--\r\n'
[2023-07-20 22:19:18,909]:INFO:ankisyncd.CollectionThread[mackenia]:Running begin(*[], **{'skey': '60fb8a6c'})
[2023-07-20 22:19:18,910]:INFO:ankisyncd.http:127.0.0.1 "POST /msync/begin HTTP/1.1" 200 52
And I also tried lower version like 2.1.63 and the problem stills there.
from ankicommunity-sync-server.
Try to downgrade to 2.1.56.
from ankicommunity-sync-server.
Related Issues (20)
- [Feature Request] LDAP Authentication HOT 2
- protobuf version issue HOT 4
- Anki (dektop) prompts to log in to AnkiWeb HOT 1
- Create Releases with Github HOT 2
- Docker Releases HOT 4
- Sync errors when trying to sync using anki 2.0.52 HOT 2
- AttributeError: module 'ankisyncd.config' has no attribute 'load' HOT 3
- Anki 2.1.49 will not sync via https proxy HOT 2
- network error HOT 1
- 'MediaManager' object has no attribute 'close' HOT 2
- Will be incompatible with new versions 2.1.57+ HOT 12
- Link in README leading to nothing HOT 1
- ci: Deploy docker image to DockerHub HOT 2
- Authentication failed for nonexistent user None. HOT 2
- anki23.10 generates JsonError { info: "missing field media usn at line 1 column 114" }
- Fix For: Python Error ./ankisyncctl.py - No Module named "ankisyncd"
- Windows new version v23.10.1 client cannot synchronize
- How to put the server on USB HDD? i am on 2.1.54 thx
- "IndexError: list index out of range" when syncing from Anki Desktop HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ankicommunity-sync-server.