'calibredb add' fails on some books

Bug #1535007 reported by Igor on 2016-01-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

There's Calibre v2.48.0 setup on FreeBSD 10.2.
I'm adding multiple books with:

# calibredb add --with-library <path_to_library> <path_to_new_books>

There are following errors for some books:

Traceback (most recent call last):
  File "/usr/local/lib/calibre/calibre/db/cache.py", line 1252, in protected_set_field
    set_field(name, val, **kwargs)
  File "/usr/local/lib/calibre/calibre/db/cache.py", line 1232, in set_field
    self._set_field(name, {book_id:val}, do_path_update=False, allow_case_change=allow_case_change)
  File "/usr/local/lib/calibre/calibre/db/cache.py", line 1054, in set_field
    book_id_to_val_map, self.backend, allow_case_change=allow_case_change)
  File "/usr/local/lib/calibre/calibre/db/write.py", line 513, in set_books
  File "/usr/local/lib/calibre/calibre/db/write.py", line 178, in one_one_in_books
    'UPDATE books SET %s=? WHERE id=?'%field.metadata['column'], sequence)
  File "/usr/local/lib/calibre/calibre/db/backend.py", line 820, in executemany
    return self.conn.cursor().executemany(sql, sequence_of_bindings)
TypeError: Bad binding argument type supplied - argument #1: type datetime.date

Attach one of these problematic files. It looks like the metadata reader
plugin for them is returning plain dates rather than full datetimes.

 status incomplete

Changed in calibre:
status: New → Incomplete

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

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
Igor (arabesc) wrote :

Please could you add a verbose mode for calibredb?
Currently if there's processing of a folder with a bunch of files then it's complicated to know which file caused the fail.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers