Open Everett115 opened 5 months ago
same issue
I'm having this issue as well
I had that issue as well.
After rebooting my Kobo, everything worked like a charm...
Same, thought without any nginx or special local network setup, just straight to my laptop's IP (for now until I actually get this work). Factory reset device (Kobo Libra 2). Followed all steps carefully. Nada. Including after reboot.
Try to turn on the dev mode in kobo. It worked for me: https://goodereader.com/blog/kobo-ereader-news/how-to-access-the-secret-kobo-developer-options
DevMode enambled (still fails) Checked in calibre-web logs and found in the access log:
[2024-06-12 11:17:47,019] 200 GET /kobo/TOKEN/v1/initialization (192.168.178.38) 266.29ms
[2024-06-12 11:17:47,091] 307 GET /kobo/TOKEN/v1/user/profile (192.168.178.38) 7.16ms
[2024-06-12 11:17:47,755] 307 GET /kobo/TOKEN/v1/user/loyalty/benefits (192.168.178.38) 3.84ms
[2024-06-12 11:17:48,167] 307 GET /kobo/TOKEN/v1/deals (192.168.178.38) 6.00ms
[2024-06-12 11:17:48,943] 200 POST /kobo/TOKEN/v1/analytics/gettests (192.168.178.38) 373.09ms
[2024-06-12 11:17:49,154] 500 GET /kobo/TOKEN/v1/library/sync?Filter=ALL&DownloadUrlFilter=Generic,Android&PrioritizeRecentReads=true (192.168.178.38) 78.28ms
Accessing that last one from my laptop browser returned this error (in a web page, not raw)
Traceback (most recent call last):
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/calibreweb/cps/kobo_auth.py", line 168, in inner
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/calibreweb/cps/web.py", line 122, in inner
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/calibreweb/cps/kobo.py", line 213, in HandleSyncRequest
"BookMetadata": get_metadata(book.Books),
^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/calibreweb/cps/kobo.py", line 475, in get_metadata
"Language": get_language(book),
^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/calibreweb/cps/kobo.py", line 430, in get_language
return isoLanguages.get(part3=book.languages[0].lang_code).part1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/iso639/iso639.py", line 265, in get
return getattr(self, key)[value]
^^^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/iso639/iso639.py", line 105, in __get__
val = self.f(instance)
^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/iso639/iso639.py", line 186, in part3
return dict((x.part3, x) for x in self.languages if x.part3)
^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/iso639/iso639.py", line 105, in __get__
val = self.f(instance)
^^^^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/iso639/iso639.py", line 174, in languages
l, i, m, p5, p2, p1 = _fabtabular()
^^^^^^^^^^^^^
File "/path/CalibreWeb/venv/lib/python3.12/site-packages/iso639/iso639.py", line 20, in _fabtabular
from pkg_resources import resource_filename
ModuleNotFoundError: No module named 'pkg_resources'
I tried accessing the others which were getting proxied to Kobo, and failing authentication (I guess because CalibreWeb proxy strips the auth credentials or whatever). Disabled "Proxy unknown requests to Kobo Store" and still no love.
So based on the above error, in kobo.py
, I "hacked" that book lang function to just return "en" (for now).
This seems to have "fixed" that issue and we can continue...
I increased the book limit to 1000 (770 kepub books)
Restarted calibre-web.
"Force full kobo sync" (this is important if one hits the api endpoint in a webbrowser because that's faking it and calibre-web thinks it's synched)
Now, for the first time, the sync didn't just fail right away. It ran "checking for updates" for about 2 minutes, then failed with "no internet" (which is … odd… wifi icon indicates it is up). Calibre-web thinks it's synched:
[2024-06-12 11:55:26,560] DEBUG {cps.kobo:209} Books to Sync: 770
[2024-06-12 11:55:28,954] DEBUG {cps.kobo:267} Remaining books to Sync: 0
But there's nothing on the device.
I then tried using the "sync only this shelf" feature with one book. This worked flawlessly. Great! But I want the the whole library sync :)
So, disabled the shelf feature again. "Force kobo full sync" On Kobo, developer settings, force Wifi to stay on… (because I am guessing the network times out trying to transfer a Gig+ of files?) … and no love. Calibre-web thinks it sync'ed but nothing got transfered.
I was going to try adding all books to a shelf and syncing that but I can't find a way to do that in a bulk action.
Ok for completeness, I tried with a library of only 90 books and it worked. So in my case:
So I continued.
pip install -r
for the requirements (after running pip install calibre-web kobo
, which itself is incorrectly documented saying you must use the []
brackets, which fails)I will try to file an issue for the book language error I got.
Describe the bug/problem
I cannot get Kobo sync working on my docker compose install of calibre web. I have added the following lines to my NGINX Reverse proxy as stated in the wiki: `proxy_hide_header X-Frame-Options;
proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k;
location /kobo { set $upstream_calibreweb $forward_scheme://$server:$port; proxy_set_header X-Forwarded-Host $http_host; proxy_pass $upstream_calibreweb; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; } `
In the admin settings for the server port I have tried port 8083, 80, & 443.
For the sync token link i have tried http & https and adding /v1/library/sync to the end and nothing works.
Log file shows a sync request when I open the api endpoint in a browser, not on my Kobo device.
INFO {cps.kobo:143} Kobo library sync request received.
Kobo device just says "Sync Failed. Please try again."
When i open the default api endoint in a browser it just shows brackets - {}. When I add /v1/library/sync to the address the browser shows the following:
When trying to sync from my Kobo the only message that shows up in the logs is
DEBUG {cps.babel:26} Could not parse locale "*": expected only letters, got '*'
LogfileEnvironment (please complete the following information):