Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when syncing media #68

Open
gajewsk2 opened this issue Aug 20, 2017 · 0 comments
Open

Issue when syncing media #68

gajewsk2 opened this issue Aug 20, 2017 · 0 comments

Comments

@gajewsk2
Copy link

gajewsk2 commented Aug 20, 2017

In debug with media sync sometimes I get this:

192.168.0.24 - - [20/Aug/2017:16:01:39 -0500] "POST /sync/meta HTTP/1.1" 200 115 "-" "Python-httplib2/0.7.7 (gzip)"
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 467, in format
    s = self._fmt % record.__dict__
MemoryError

I'm on ubuntu bash on windows. I managed to get the server running, but my deck has about 200k media cards. I originally got a memory error, but now the server in debug mode doesn't say anything and the anki client says the string buffer error below, under the condition i don't do a media sync.
I'm getting this ambiguous error and not able to figure out what the bad response actually is, since anki only throws this up:

Syncing failed:
Traceback (most recent call last):
  File "aqt\sync.py", line 324, in run
  File "aqt\sync.py", line 385, in _sync
  File "aqt\sync.py", line 416, in _syncMedia
  File "anki\sync.py", line 739, in sync
  File "anki\sync.py", line 873, in begin
  File "json\__init__.py", line 326, in loads
  File "json\decoder.py", line 366, in decode
TypeError: expected string or buffer

The reason for me doing a custom server is because I hope to get around the 250MB collection limit. Is it possible to only sync with the custom server your base and no media - since there is no restriction on collection media size?

I removed the line from mysyncserver.py to be, but get the same ambiguous error

import anki.sync
anki.sync.SYNC_BASE = 'http://127.0.0.1:27701/'

and removed anki.sync.SYNC_MEDIA_BASE = 'http://127.0.0.1:27701/msync/'

If I disable media sync, things work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant