marcus-crane / october

A simple GUI for retrieving Kobo highlights and syncing them with Readwise
https://october.utf9k.net
MIT License
173 stars 10 forks source link

received a non-200 status code from Readwise: code 400 #134

Open NTU-Sherlock opened 1 month ago

NTU-Sherlock commented 1 month ago

I have an issue with uploading in App purchased books with Macbook Kobo.desktop app. error: received a non-200 status code from Readwise: code 400 #134

This is my log. {"level":"info","msg":"Logger should be initialised now","time":"2024-09-27T12:31:15+08:00"} {"level":"info","msg":"Backend is about to start up","time":"2024-09-27T12:31:15+08:00"} {"level":"warning","msg":"Found an entry with neither highlighted text nor an annotation so skipping entry","time":"2024-09-27T12:32:38+08:00","title":"一如既往:不變的人性法則與致富心態","volume_id":"7d163fca-dce6-42e1-bb90-e31efd088595"} {"level":"warning","msg":"Found an entry with neither highlighted text nor an annotation so skipping entry","time":"2024-09-27T12:32:38+08:00","title":"一如既往:不變的人性法則與致富心態","volume_id":"7d163fca-dce6-42e1-bb90-e31efd088595"} {"batch_count":1,"highlight_count":115,"level":"info","msg":"Successfully parsed highlights","time":"2024-09-27T12:32:38+08:00"} {"level":"error","msg":"Received a non-200 response from Readwise","response":"{\"note\":[\"This field may not be blank.\"]}","status_code":400,"time":"2024-09-27T12:32:39+08:00"} {"level":"warning","msg":"Found an entry with neither highlighted text nor an annotation so skipping entry","time":"2024-09-27T12:32:43+08:00","title":"一如既往:不變的人性法則與致富心態","volume_id":"7d163fca-dce6-42e1-bb90-e31efd088595"} {"level":"warning","msg":"Found an entry with neither highlighted text nor an annotation so skipping entry","time":"2024-09-27T12:32:43+08:00","title":"一如既往:不變的人性法則與致富心態","volume_id":"7d163fca-dce6-42e1-bb90-e31efd088595"} {"batch_count":1,"highlight_count":115,"level":"info","msg":"Successfully parsed highlights","time":"2024-09-27T12:32:43+08:00"} {"level":"error","msg":"Received a non-200 response from Readwise","response":"{\"note\":[\"This field may not be blank.\"]}","status_code":400,"time":"2024-09-27T12:32:44+08:00"} {"level":"warning","msg":"Found an entry with neither highlighted text nor an annotation so skipping entry","time":"2024-09-27T12:33:01+08:00","title":"一如既往:不變的人性法則與致富心態","volume_id":"7d163fca-dce6-42e1-bb90-e31efd088595"} {"level":"warning","msg":"Found an entry with neither highlighted text nor an annotation so skipping entry","time":"2024-09-27T12:33:01+08:00","title":"一如既往:不變的人性法則與致富心態","volume_id":"7d163fca-dce6-42e1-bb90-e31efd088595"} {"batch_count":1,"highlight_count":115,"level":"info","msg":"Successfully parsed highlights","time":"2024-09-27T12:33:01+08:00"} {"level":"error","msg":"Received a non-200 response from Readwise","response":"{\"note\":[\"This field may not be blank.\"]}","status_code":400,"time":"2024-09-27T12:33:01+08:00"} {"error":"file is not a database (26)","level":"error","msg":"Failed to count bookmarks on device","time":"2024-09-27T12:33:10+08:00"} {"error":"file is not a database (26)","level":"error","msg":"Failed to count bookmarks on device","time":"2024-09-27T12:33:10+08:00"} {"error":"file is not a database (26)","level":"error","msg":"Failed to count bookmarks on device","time":"2024-09-27T12:33:13+08:00"} {"level":"error","msg":"Tried to submit highlights when there are none on device.","time":"2024-09-27T12:33:13+08:00"} {"level":"warning","msg":"Found an entry with neither highlighted text nor an annotation so skipping entry","time":"2024-09-27T12:35:46+08:00","title":"一如既往:不變的人性法則與致富心態","volume_id":"7d163fca-dce6-42e1-bb90-e31efd088595"} {"level":"warning","msg":"Found an entry with neither highlighted text nor an annotation so skipping entry","time":"2024-09-27T12:35:46+08:00","title":"一如既往:不變的人性法則與致富心態","volume_id":"7d163fca-dce6-42e1-bb90-e31efd088595"} {"batch_count":1,"highlight_count":115,"level":"info","msg":"Successfully parsed highlights","time":"2024-09-27T12:35:46+08:00"} {"level":"error","msg":"Received a non-200 response from Readwise","response":"{\"note\":[\"This field may not be blank.\"]}","status_code":400,"time":"2024-09-27T12:35:47+08:00"} {"level":"info","msg":"Successfully validated token against the Readwise API","time":"2024-09-27T12:36:50+08:00"}


System Details
  • Version: v1.10.0
  • Platform: darwin
  • Architecture: arm64
  • Onboarding Complete: true

20240927123114.json

NTU-Sherlock commented 1 month ago

Actually, I am not so sure if the file I choose is correct, Kobo.sqlite. I tried every other file, only this make sense. however it returned errors. File location is ~/Library/Application Support/Kobo/Kobo Desktop Edition/

marcus-crane commented 1 month ago

Hi @NTU-Sherlock,

I had a brief look at the logs you shared and it seems that highlights in that database are detected but one or more fields it expects to find populated is missing.

It could be say; a book missing an author for example but I can't really say without having a look at the database directly.

I've never tried to run a database created by the Kobo Desktop App through October as it was never designed to work with it, just regular physically connected Kobo devices.

If you don't have a real Kobo and you're just using the desktop app for store purchased books, you should be able to use the official Readwise integration (that only works with the Kobo store) unless you're having trouble with it?

NTU-Sherlock commented 1 month ago

Yes, I do have trouble with it. The syncing is not smooth, sometimes I have to disconnect and reconnect. However, this book always failed to sync, that's why I have to tried October.

marcus-crane commented 1 month ago

I've installed Kobo Desktop Edition and I seem to have a similar issue (specifically that no highlights appear but I might find more as I get further in) so I'll do some debugging and see what's required to support the desktop version.

I'm not hugely surprised that it doesn't work out of the box as there are no guarantees that the Kobo's internal database file matches the desktop version and October had never been developed with the desktop client in mind.

The exact layout of the database mostly stays the same but does slightly change over time as new devices are released.

NTU-Sherlock commented 1 month ago

Hi Marcus,

Thanks for the response.

Do you think using iPhone Kobo app would make any difference? Or I must connect with Kobo E-reader?

NTU-Sherlock commented 1 month ago

Hi Marcus,

I successfully Sync from Kobo official connections with Readwise.

This is what I did: As shown in first post. The problem a specific books error- 一如既往, which is the one missing from readwise.

Then I review my notes on Kobo, I found out there is a typo "zhuyin" (looks like ㄩ) in my note, so I deleted it. I also delete some empty notes, (looks like " ")

Then I tried re-sync again, the notes is import from Kobo to Readwise without a problem.

Thank you very much!

marcus-crane commented 1 month ago

Hey there,

Do you think using iPhone Kobo app would make any difference?

I've never tried using the iPhone app and then seeing what the resulting database looks like. October was never designed to work with anything but actual Kobo eReader devices. If other devices like the desktop app work, it's only be coincidence and not by design although I'm not opposed to adding support, depending on what is involved.

I successfully Sync from Kobo official connections with Readwise.

Ah, great! I haven't looked into the issue any further as I have a lot of life stuff on at the moment so I haven't had much time at home

Thanks for the update and I'll post here when I get around to looking into the issue further.

danicotillas commented 3 days ago

I'm having exactly the same problem on Debian 12. Here my log:

{"level":"info","msg":"Logger should be initialised now","time":"2024-11-13T15:39:46+01:00"} {"level":"info","msg":"Backend is about to start up","time":"2024-11-13T15:39:46+01:00"} {"level":"info","msg":"Successfully validated token against the Readwise API","time":"2024-11-13T15:40:03+01:00"} {"batch_count":1,"highlight_count":246,"level":"info","msg":"Successfully parsed highlights","time":"2024-11-13T15:41:17+01:00"} {"level":"error","msg":"Received a non-200 response from Readwise","response":"{\"note\":[\"This field may not be blank.\"]}","status_code":400,"time":"2024-11-13T15:41:18+01:00"} {"batch_count":1,"highlight_count":246,"level":"info","msg":"Successfully parsed highlights","time":"2024-11-13T15:41:34+01:00"} {"level":"error","msg":"Received a non-200 response from Readwise","response":"{\"note\":[\"This field may not be blank.\"]}","status_code":400,"time":"2024-11-13T15:41:35+01:00"} {"device_id":"00000000-0000-0000-0000-000000000388","level":"info","msg":"Found an attached device","time":"2024-11-13T15:41:41+01:00"} {"device_id":"00000000-0000-0000-0000-000000000388","level":"info","msg":"Found an attached device","time":"2024-11-13T15:41:41+01:00"} {"batch_count":1,"highlight_count":246,"level":"info","msg":"Successfully parsed highlights","time":"2024-11-13T15:41:46+01:00"} {"level":"error","msg":"Received a non-200 response from Readwise","response":"{\"note\":[\"This field may not be blank.\"]}","status_code":400,"time":"2024-11-13T15:41:47+01:00"} {"batch_count":1,"highlight_count":246,"level":"info","msg":"Successfully parsed highlights","time":"2024-11-13T15:41:57+01:00"} {"level":"error","msg":"Received a non-200 response from Readwise","response":"{\"note\":[\"This field may not be blank.\"]}","status_code":400,"time":"2024-11-13T15:41:57+01:00"} {"level":"info","msg":"Shutting down. Goodbye!","time":"2024-11-13T15:41:59+01:00"}