Vertical bar "|" in author name causes ConstraintError

Bug #1220348 reported by FaceDeer on 2013-09-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I was messing around with the FanFictionDownloader plugin and came across a story,, whose author had a "|" character in his name. This caused FFDL to choke so I investigated further and found some odd behavior, which I detailed here:

The part that's important for Calibre in general is that if I edit an author's name to add a "|" character into it I get

File "site-packages\calibre\db\", line 458, in set_metadata
File "site-packages\calibre\db\", line 56, in ans
File "site-packages\calibre\db\", line 1123, in set_metadata
File "site-packages\calibre\db\", line 1110, in set_field
File "site-packages\calibre\db\", line 931, in set_field
File "site-packages\calibre\db\", line 505, in set_books
File "site-packages\calibre\db\", line 367, in many_many
File "site-packages\calibre\db\", line 243, in get_db_id
File "site-packages\calibre\db\", line 287, in execute
File "c:\cygwin\home\kovid\sw\build\apsw-\src\cursor.c", line 231, in resetcursor
ConstraintError: ConstraintError: column name is not unique

This doesn't appear to be an FFDL-specific bug, it looks like perhaps the value just isn't being properly sanitized or encoded.

When the problem arose via FFDL Calibre was also put into an inconsistent state, the main library grid listed the author with a comma in place of the bar but the metadata edit window showed the author's name with a bar. There's more detail about that in the forum post linked above, I don't know whether this is a separate issue or something FFDL-specific.

This is with Calibre 1.1.0

FaceDeer (derksenmobile) on 2013-09-03
description: updated

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers