View Single Post
Old 08-09-2014, 12:31 PM   #1
goyta
Junior Member
goyta began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2014
Location: São Paulo, Brazil
Device: none
Error importing/editing metadata with files from Feedbooks - Calibre 1.48 Windows x64

I have recently downloaded four e-books from Feedbooks (actually only two, but one of them in three different formats), and Calibre 1.48 (Windows, x64) is having problems processing them. The problem seems to be unrelated to any specific format; it's happening with all of them (the books are in MOBI, ePub and PDF, and the same problem is happening with all of them).

First, when I add the book to the library, the Management module shows the message:

WARNING: Failed to read metadata originating from:

The detailed message is in the spoiler below:

Spoiler:

calibre, version 1.48.0
AVISO: Falhou na leitura dos metadados: Falhou na leitura dos metadados vindos de:

2029.mobi
Traceback (most recent call last):
File "site-packages\calibre\gui2\add.py", line 165, in start
File "site-packages\calibre\gui2\add.py", line 254, in add
File "site-packages\calibre\db\legacy.py", line 211, in create_book_entry
File "site-packages\calibre\db\cache.py", line 57, in call_func_with_lock
File "site-packages\calibre\db\cache.py", line 1474, in create_book_entry
File "site-packages\calibre\db\cache.py", line 1215, in set_metadata
File "site-packages\calibre\db\cache.py", line 1202, in set_field
File "site-packages\calibre\db\cache.py", line 1024, in set_field
File "site-packages\calibre\db\write.py", line 513, in set_books
File "site-packages\calibre\db\write.py", line 375, in many_many
File "site-packages\calibre\db\write.py", line 241, in get_db_id
File "site-packages\calibre\ebooks\metadata\__init__.py", line 67, in author_to_author_sort
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-2: invalid continuation byte


In spite of the error, after that the book appears on the Management module's library list, but when I try to open it by double-clicking on the entry, the following message appears (also in Portuguese, I've translated it):

ERROR: Unable to view: [book title] has no available formats

(There is no further detailed message.)

I guess this must be because Management is not copying the e-book file to the library folder or creating the appropriate subfolders.

However, when I open the e-book file directly from Windows Explorer (Calibre is set as my default e-book reader), the Viewer module opens it normally and without any problems. The problem seems to be only in the Management module, which is why I have posted this thread on this sub-forum.

After importing the book, it also appears without the author on the library list in Calibre Management. (Oddly, when I sort the list by author name, the book appears between author letters D and E - the books are by William Olaf Stapledon.) When I try to edit the metadata to include the author, sometimes the author appears correctly in the "Author(s)" field, sometimes in the "Ordered author" field, sometimes in neither, randomly and for the same book. Then I try to edit the blank field, but as I type each single character, the following error message appears:

UnicodeDecodeError:'utf8' codec can't decode bytes in position 1-2: invalid continuation byte

(This message is not localized and appears in English.)

Detailed message:

Spoiler:

calibre, version 1.48.0
ERRO: Exceção sem tratamento: <b>UnicodeDecodeError</b>:'utf8' codec can't decode bytes in position 1-2: invalid continuation byte

calibre 1.48 [64bit] isfrozen: True is64bit: True
Windows-8-6.2.9200 Windows ('64bit', 'WindowsPE')
('Windows', '8', '6.2.9200')
Python 2.7.5
Windows: ('8', '6.2.9200', '', 'Multiprocessor Free')
Traceback (most recent call last):
File "site-packages\calibre\gui2\metadata\basic_widgets.py", line 373, in update_state_and_val
File "site-packages\calibre\ebooks\metadata\__init__.py", line 95, in authors_to_sort_string
File "site-packages\calibre\ebooks\metadata\__init__.py", line 67, in author_to_author_sort
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-2: invalid continuation byte



Even if I patiently type each character and dismiss the message every time, I can't save the edit, because the message above appears again and the window doesn't close. I have to cancel and lose my changes. The same message also appears if I paste the full text or try to move the "Author(s)" field's contents to "Ordered author" by clicking on the arrow. I'm stuck.

I'm running Calibre on a powerful PC with a hexa-core processor, 16 GB RAM, tons of free disk space, no malware, running Windows 8.1 Update 1 x64.

Any hints to solve the problem? Thank you very much for your help.

Last edited by goyta; 08-09-2014 at 12:37 PM. Reason: Clarification
goyta is offline   Reply With Quote