Open kanjieater opened 1 month ago
There is a publish with the same name, but different in the database. I don't know how to give an example form JKC letters but for normal ascii characters it would be something like "Unknown" and "unknown" (Capital letter or not)
There is a publish with the same name, but different in the database. I don't know how to give an example form JKC letters but for normal ascii characters it would be something like "Unknown" and "unknown" (Capital letter or not)
How do you avoid this? Only add books via calibre-web? Reset my library and let calibre-web handle all imports?
@kanjieater in my particular case, with you same error (publishers.name
key value) I had to manually edit the books in my library with that particular publisher name that caused the error.
go to "book list" (last item in the left dashboar menu); order by "editor" and look for the publisher name that brings your error; manually edit (click on its name) deleting its value in every book that has this publisher. In my case there were only three.
then try to add a new book and it worked for me
then manually edit again those previous books adding back its publisher name.
I know, this is not how it should work, but at least I could add new books to library
I'm having the same issue with certain book:
Oops! Database Error: UNIQUE constraint failed: tags.name.
I only add books from the calibre-web UI.
I run the calibre-web in docker in TrueNAS, and somehow the logs of the application are not shown, so the only alternative I got was to copy the metadata.db
to a local calibre and test again.
The database loaded successfully and I ran a validation of the database that showed no errors. Then I tried to add the book and it was added with no problems. Now I can see the tags
of the book:
Historia, Religion
So basically the suggestion is to update the DB locally and upload it to calibre-web every time I get this type of error?
Edit:
I found the logs in the container and I think there's a bug somewhere in the code while trying to reuse an existing tag, probably related to char encoding.
[2024-06-14 15:50:51,430] ERROR {cps.editbooks:305} Database error: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
(sqlite3.IntegrityError) UNIQUE constraint failed: tags.name
[SQL: UPDATE tags SET name=? WHERE tags.id = ?]
[parameters: ('Religion', 839)]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
I‘ll have a look at it
I am also having this issue, but for authors.name
. I had a book called The Cyberiad by Stanislaw Lem, and was trying to upload Solaris from the same author.
I saw that The Cyberiad was under the author Stanisław Lem (with a ł), and the book I was uploading mustn't have had the ł character, because when I renamed the author in The Cyberiad to be Stanislaw, I was then able to upload Solaris.
Hope this helps!
@kaibagley: I can reproduce it
It's a bit tricky, I need some tests, the solution will show up within next week
For some additional information, the error message I encountered was UNIQUE constraint failed: authors.name
.
The uploaded epub files' author name 理不盡な孫の手
was conflicted with the author name 理不尽な孙の手
of books already inside the database.The difference inbetween is Japanese kanji/traditional Chinese and simplified Chinese characters (its actually a Japanese name, but different translators chose different approaches when dealing with the author name).
I suspect that some kind of pluggin identify these two as the same key but with different characters, causing the unique contraint in database to fail. Therefore I changed the author name into 理不尽な孙の手
using calibre ebook editior, specifically speaking, the <dc:creator opf:role="aut"> </dc:creator>
line in content.opf
page, and it worked just fine. The book after editing could be uploaded and identified just like any other books.
Hope this would help, and thanks again for all your efforts put in this project.
Describe the bug/problem
Books uploaded to Calibre-web fails. Book added to classic calibre succeeds. Ran Library Maintenance, fix and deleted, found no issues, issue persists. Oops! Database Error: UNIQUE constraint failed: publishers.name.
Publisher in question: 株式会社 東京創元社
To Reproduce
Steps to reproduce the behavior:
--- Logging error ---
Expected behavior
Books that can be added to Calibre should be able to be added to Calibre-Web without having to open Calibre
Environment (please complete the following information):
Additional context Add any other context about the problem here. [e.g. access via reverse proxy, database background sync, special database location]