View Single Post
Old 09-02-2013, 11:43 PM   #1742
FaceDeer
Connoisseur
FaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enoughFaceDeer will become famous soon enough
 
Posts: 89
Karma: 706
Join Date: Nov 2012
Device: Kobo Touch
Interesting! This looks like an entirely different bug than the & one.

I popped over to my empty testbed library and downloaded the story, and it worked fine. I then tried updating it (with "update epub always" and "update calibre metadata" for maximum updatage) and that worked fine too. But then I switched to a different library, switched back, and tried updating it the exact same way and that time it failed.

Upon further examination, the author field is behaving strangely in ways that might indicate a bug in Calibre itself. Here's how it looked right after the initial download:

shot 1

Note how the author is listed as "Rainbow|Dash" in the main library table, but "Rainbow,Dash" in the metadata edit window.

Then after switching libraries and back again, it looked like this:

shot 2

The main library table had updated to match the metadata edit window, and the error came up when updating. Here's the error message:

Quote:
calibre, version 1.1.0
ERROR: Error Updating Metadata: <p>An error has occurred while FFDL was updating calibre's metadata for <a href='http://www.fimfiction.net/story/40187/'>Battlepony 3</a>.</p>The ebook has been updated, but the metadata has not.

Traceback (most recent call last):
File "calibre_plugins.fanfictiondownloader_plugin.ffdl_ plugin", line 1113, in update_books_loop
File "calibre_plugins.fanfictiondownloader_plugin.ffdl_ plugin", line 1442, in update_metadata
File "site-packages\calibre\db\legacy.py", line 458, in set_metadata
File "site-packages\calibre\db\cache.py", line 56, in ans
File "site-packages\calibre\db\cache.py", line 1123, in set_metadata
File "site-packages\calibre\db\cache.py", line 1110, in set_field
File "site-packages\calibre\db\cache.py", line 931, in set_field
File "site-packages\calibre\db\write.py", line 505, in set_books
File "site-packages\calibre\db\write.py", line 367, in many_many
File "site-packages\calibre\db\write.py", line 243, in get_db_id
File "site-packages\calibre\db\backend.py", line 287, in execute
File "c:\cygwin\home\kovid\sw\build\apsw-3.7.14.1-r1\src\cursor.c", line 231, in resetcursor
ConstraintError: ConstraintError: column name is not unique
Followed by the story details (which included "author: [u'Rainbow|Dash']" and "author_sort: [u'Rainbow|Dash']" if that's useful).

Attempting to change the author name manually to "Rainbow|Dash" triggers the same constraint error about non-unique column names.

Last edited by FaceDeer; 09-03-2013 at 12:07 AM. Reason: change image tags to link tags
FaceDeer is offline