Closed reitenth closed 7 months ago
Hi, the goodreads import expects isbn to be present.
Is there a reason none of your books has either isbn10 or isbn13 filled ?
Or it can be that goodreads changed (again) their export format. I can have a look at your file if you can share it to me (or even juste some lines if you want). You can paste the lines here or send me your file at stls@ik.me
Ok, the file is fine. So according to the logs the import should have added 132 books to your jelu library and ignored a bunch of lines without isbn.
This is actually the standard behaviour of the goodreads csv import.
Maybe I should state it clearly in the docs.
You can import those missing books using the jelu built in metadata fetching.
Or manage to get th isbn added through goodreads and re-export a fuller csv.
Hello, not the same person, but I'm also having the same problem after a fresh installation using Docker. I've just exported my Goodreads data, and after import only 1 book has been added.
In the logs it says "parsing finished, 473 entries recorded" though I'm not sure what that means.
Find attached my Goodreads export: goodreads_library_export.csv
@KucharczykL the logs mean that 473 lines from your csv have been kept, waiting for the metadata retrieval.
Import happens in 2 steps, first the csv is read and all relevant data is kept in database and then the second step happens, which tries to fetch metadata online (depending if you chose this option on the import page). The second step can be quite long and happens in the background. You can see the beginning and end of your import in your dashboard, in the messages section. I suggest you wait a bit and see if books are added. I tested your file and at least some files are added.
There must be some difference between our setups then because since I wrote my previous message nothing else has happened:
I've checked the logs and the last message is: "csv parsing of $FILE ended after: 15 seconds" and that's it.
Just for completion's sake, this is my Docker compose file:
---
services:
jelu:
image: wabayang/jelu
container_name: jelu
volumes:
- ${DOCKER_STORAGE_PATH}/jelu/config:/config
- ${DOCKER_STORAGE_PATH}/jelu/database:/database
- ${DOCKER_STORAGE_PATH}/jelu/files/images:/files/images
- ${DOCKER_STORAGE_PATH}/jelu/files/imports:/files/imports
- /etc/timezone:/etc/timezone:ro
networks:
- public
environment:
SERVER_PORT: 1111
SPRING_DATASOURCE_USERNAME: lukas
SPRING_DATASOURCE_PASSWORD: Q^k5i2^hN!wmEr6JLkYP9ME
JELU_CORS_ALLOWED-ORIGINS: https://jelu.${DOMAIN}
profiles:
- base
restart: unless-stopped
I'm serving it via Caddy reverse proxy:
jelu.${DOMAIN} {
handle {
reverse_proxy jelu:1111
}
}
This is my whole log after restarting the container:
That's weird. Your config seem fine and the logs are the same as those I have after importing your file, except that on your side the processing seem to stop at one moment, after the csv parsing.
If you asked the import to fetch the metadata you can try to set the metadata logs to TRACE level to see if there is any activity :
logging:
level:
io.github.bayang.jelu: DEBUG
io.github.bayang.jelu.service.metadata: TRACE
This is what I have in my logs, it is the same as you :
2023-12-02T18:44:51.824+01:00 DEBUG 21538 --- [task-1] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId 6, title Harry Potter and the Goblet of Fire (Harry Potter, #4) and author J.K. Rowling, import it yourself manually
2023-12-02T18:44:51.857+01:00 DEBUG 21538 --- [task-1] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId 15881, title Harry Potter and the Chamber of Secrets (Harry Potter, #2) and author J.K. Rowling, import it yourself manually
2023-12-02T18:44:51.859+01:00 DEBUG 21538 --- [task-1] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId 157993, title The Little Prince and author Antoine de Saint-Exupéry, import it yourself manually
2023-12-02T18:44:51.985+01:00 DEBUG 21538 --- [task-1] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId 4407, title American Gods (American Gods, #1) and author Neil Gaiman, import it yourself manually
2023-12-02T18:44:52.018+01:00 DEBUG 21538 --- [task-1] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId 2122, title The Fountainhead and author Ayn Rand, import it yourself manually
2023-12-02T18:44:52.605+01:00 DEBUG 21538 --- [task-1] i.g.b.j.s.imports.CsvImportService : parsing finished, 473 entries recorded
2023-12-02T18:44:58.816+01:00 INFO 21538 --- [task-1] i.g.b.j.s.imports.CsvImportService : csv parsing of /home/me/perso/jelu-data/imports/goodreads_library_export2.csv ended after : 50 seconds
2023-12-02T18:45:37.578+01:00 DEBUG 21538 --- [task-1] i.g.b.jelu.service.metadata.OpfParser : parsed dto MetadataDto(title=Problém tří těles, isbn10=null, isbn13=9788075770615, summary=null, image=null, publisher=Host, pageCount=null, publishedDate=2017-12-15T17:45:23.104509+00:00, authors=[Cixin Liu], tags=[], series=null, numberInSeries=null, language=ces, googleId=X3NCswEACAAJ, amazonId=null, goodreadsId=null)
2023-12-02T18:45:52.819+01:00 DEBUG 21538 --- [task-1] i.g.b.jelu.service.metadata.OpfParser : parsed dto MetadataDto(title=A Deepness in the Sky, isbn10=null, isbn13=9780812536355, summary=<p>After thousands of years searching, humans stand on the verge of first contact with an alien race. Two human groups: the Qeng Ho, a culture of free traders, and the Emergents, a ruthless society based on the technological enslavement of minds.</p>
etc...
Also, what architecture are you on ? ARM or not ? Can you manually test to import a book to check if the online metadata import is working ? (in add book -> auto fill from internet)
My server is running Debian on amd64 architecture.
I've tried manually importing a book with ISBN 0060512806 - this worked 👍 I've tried importing the Goodreads export again, and this is stuck as before. I've enabled the more detailed logging:
jelu | 2023-12-03T10:01:54.273+01:00 DEBUG 1 --- [ task-1] i.g.b.j.s.imports.CsvImportService : parsing finished, 473 entries recorded
jelu | 2023-12-03T10:01:54.276+01:00 INFO 1 --- [ task-1] i.g.b.j.s.imports.CsvImportService : csv parsing of /files/imports/goodreads_library_export.csv ended after : 9 seconds
jelu | 2023-12-03T10:01:55.018+01:00 TRACE 1 --- [ task-1] i.g.b.j.s.metadata.FetchMetadataService : plugins to use : [PluginInfo(name=calibre, order=1000)]
jelu | 2023-12-03T10:01:55.018+01:00 TRACE 1 --- [ task-1] i.g.b.j.s.metadata.FetchMetadataService : fetching provider for plugin calibre with order 1000
jelu | 2023-12-03T10:01:55.018+01:00 TRACE 1 --- [ task-1] i.g.b.j.s.m.p.CalibreMetadataProvider : fetch metadata command : [/calibre/fetch-ebook-metadata, -o, -d 90, -i, 9780812536355, -p, Google, -p, Amazon.com, -c, /files/images/meta-import-9780812536355-1701594115018.jpg]
With the manual import, the metadata was brought almost immediately. With this, nothing 🤔 If I do ps aux | grep calibre
:
root 1660102 0.5 1.7 723768 140208 ? S 10:01 0:01 /calibre/bin/fetch-ebook-metadata -o -d 90 -i 9780812536355 -p Google -p Amazon.com -c /files/images/meta-import-9780812536355-1701594115018.jpg
According to the manual, the S means: S interruptible sleep (waiting for an event to complete)
The ISBN 9780812536355 however doesn't work even manually! Maybe the fetch-ebook-metadata
executable is choking on it for some reason?
I've tried running the command inside the container: /calibre/fetch-ebook-metadata -i 9780812536355
and this worked.
first of all, thank you for debugging.
It looks like the calibre fetch-ebook-metadata executable is choking on some task and stops there.
What I don't get is that I explicitly set the -d 90
parameter to avoid this kind of problem since this it sets a timeout.
I would expect the command to return after 90 secs no matter what.
Can you try to add the timeout parameter to the command that worked to see if this parameter is broken for some reason :
/calibre/fetch-ebook-metadata -i 9780812536355 -d 90
What you can also try is to remove the line that blocks from your csv and relaunch an import, to see if that is this specific book that makes calibre choke or if we have a broader problem.
The ideal would be to try on a fresh database because the previous lines from your previous attempts are still in db waiting to be fetched.
If you don't want to start from a fresh DB I'll tell you how to change the status of the entries so that they are flagged as processed and ignored.
Can you try to add the timeout parameter to the command that worked to see if this parameter is broken for some reason :
/calibre/fetch-ebook-metadata -i 9780812536355 -d 90
This worked without a problem.
What you can also try is to remove the line that blocks from your csv and relaunch an import, to see if that is this specific book that makes calibre choke or if we have a broader problem. The ideal would be to try on a fresh database because the previous lines from your previous attempts are still in db waiting to be fetched.
I have removed "Deepness in the Sky" (line 3) from the CSV, deleted my database, and started the import. This time it worked!
So that's curious that running the command manually from inside the container works, but as an import trigger by Jelu it gets stuck.
Ok that is a good news, I guess. There is probably something funny happening somewhere but I can't tell what. This is the first time this is mentioned in an issue, although I expect more weird stuff happening as long as we use calibre to fetch metadata (cf pinned issue). This calibre stuff is heavily rate limited on googles side and I guess also on amazon, this is why I'm adding other sources. The initial import is still the harder to get due to the volume of metadata to get.
Would something like https://openlibrary.org/developers/api work?
Yes, it is definitely in the candidates for the future metadata plugins among others. I wanted calibre to start because as a non english speaker, this is the most comprehensive source of metadata. You can try to find the books you read in openlibrary for example, my guess is that you won't find that many references. Google books api is also available in jelu if you have an api key and you can also directly use your epubs as a source now.
I just wanted to pop in and say this has been happening to me as well. I'm running the docker version on unraid. I was able to import a few days ago, but is broken when I attempt to import today. I exported the csv using calibre from my library and it wouldn't import.
I tried exporting just a list of isbn numbers to a csv file, and it didn't work either.
Before coming here, I even tried the sample that is provided by goodreads, and that fails as well: https://www.goodreads.com/assets/sample_export.csv
Here is the error using the sample file:
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.098-08:00 DEBUG 1 --- [io-11111-exec-6] i.g.b.jelu.controllers.ImportController : target import file at /files/imports/sample_export.csv
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.138-08:00 DEBUG 1 --- [ task-8] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId memoirs of a geisha, title arthur golden and author 99498189, import it yourself manually
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.139-08:00 DEBUG 1 --- [ task-8] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId Blink: The Power of Thinking Without Thinking, title Malcolm Gladwell and author 316172324, import it yourself manually
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.139-08:00 DEBUG 1 --- [ task-8] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId Power of One, title Bryce Courtenay and author 034541005X, import it yourself manually
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.139-08:00 DEBUG 1 --- [ task-8] i.g.b.j.s.imports.CsvImportService : Missing isbn for line with goodreadsId Dune (Dune Chronicles Book 1), title Frank Herbert and author 441172717, import it yourself manually
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.140-08:00 DEBUG 1 --- [ task-8] i.g.b.j.s.imports.CsvImportService : parsing finished, 0 entries recorded
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.140-08:00 INFO 1 --- [ task-8] i.g.b.j.s.imports.CsvImportService : csv parsing of /files/imports/sample_export.csv ended after : 0 seconds
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.143-08:00 DEBUG 1 --- [ task-8] i.g.b.j.s.imports.CsvImportService : File /files/imports/sample_export.csv was successfully renamed after processing : true
12/07/2023
12:38:33 PM
2023-12-06T15:38:33.143-08:00 INFO 1 --- [ task-8] i.g.b.j.s.imports.CsvImportService : Import for /files/imports/sample_export.csv ended after : 0 seconds, with 0 imports and 0
The attempted import takes less than a second so it's not a timeout issue.
Importing manually works fine, however I have a very large library and doing it all manually isn't feasible unfortunately.
@Taubin the goodreads sample csv does not look like the exports I've seen until now, I'll have a look, maybe goodreads changed their export format. That is why you the "missing isbn" logs, the parsing actually fails.
If you want you can send me your real csv and I can check to find what is wrong with it.
We have actually several cases in this issue :
@bayang I'm so sorry, I screwed up. I was attempting to import my calibre export, not my goodreads export. I had accidentally overwritten my goodreads export with my calibre export. Sorry for adding clutter.
@Taubin don't worry, it happens to everyone.