Hey all, Calibre 6.29.0 on Ubuntu Mate 22.04 here. After copying a bunch of Pokemon books to the SD card of my daughter's PRS-505, I'm now getting the error:
Code:
calibre, version 6.29.0
ERROR: Error: Error communicating with device
Document is empty, line 1, column 1 (<string>, line 1)
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/device.py", line 104, in run
self.result = self.func(*self.args, **self.kwargs)
File "/usr/lib/calibre/calibre/gui2/device.py", line 558, in _books
mainlist = self.device.books(oncard=None, end_session=False)
File "/usr/lib/calibre/calibre/devices/prs505/driver.py", line 197, in books
bl = USBMS.books(self, oncard=oncard, end_session=end_session)
File "/usr/lib/calibre/calibre/devices/usbms/driver.py", line 316, in books
self.sync_booklists((bl, None, None))
File "/usr/lib/calibre/calibre/devices/prs505/driver.py", line 205, in sync_booklists
c = self.initialize_XML_cache()
File "/usr/lib/calibre/calibre/devices/prs505/driver.py", line 193, in initialize_XML_cache
return XMLCache(paths, ext_paths, prefixes, self.settings().use_author_sort)
File "/usr/lib/calibre/calibre/devices/prs505/sony_cache.py", line 116, in __init__
self.roots[source_id] = safe_xml_fromstring(
File "/usr/lib/calibre/calibre/utils/xml_parse.py", line 26, in safe_xml_fromstring
ans = fs(string_or_bytes, parser=create_parser(recover))
File "src/lxml/etree.pyx", line 3252, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1913, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1793, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1082, in lxml.etree._BaseParser._parseUnicodeDoc
File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
File "<string>", line 1
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1
The ereader no longer shows any collections data. According to the jobs list, the failure occurred at "Get list of books on device." Other PRS-505 ereaders communicate without issue.
Rebooted ereader, rebooted computer, no change.
Tried erasing driveinfo.calibre and metadata.calibre from both internal memory and SD card, error persists.
Potential data point: this is the first time I've added a book that contained an accented character, the é in Pokémon; the accented character is present in series data also.
Attempted to copy a Pokémon book to a third PRS-505 (I got a job lot of eleven of these things off eBay and I love them), it loaded and read and communicated with no issues (although this particular third PRS-505 is on demo firmware and my daughter's is on a later version; I think these were display models). Out of interest, attempted to open SD Card/Sony Reader/database/cache.xml and Pluma errored out, unable to read the file encoding.
So I made a backup of that file, and erased it on the reader, figuring that it would probably spend some time rebuilding its various databases, and in doing so, potentially correct the issue. I also erased SD Card/Sony Reader/database/cacheExt.xml, and SD Card/Sony Reader/sync/deleted.xml. Then I went into the device's onboard memory and erased database/cache/cacheExt.xml and media.xml, and database/sync/deleted.xml.
After ejecting the device, it took a few minutes to rebuild its cache. I then plugged it back into Calibre, got the same error, noted that my SD Card/Sony Reader/database/cache.xml still threw a character encoding error in Pluma.
I erased all but the first Pokemon Adventures that I knew worked on the other PRS-505, and then repeated the above deletion steps to prompt the ereader to rebuild its cache.
Same error message, same backtrace.
Shut down the ereader, popped out the SD card, put it into my computer's SD reader, Sony Reader/database/cache.xml still can't be opened in Pluma, complaining again that it can't detect the character encoding.
Out of curiosity, booted the ereader with the SD card out, plugged it in, Calibre detected it without issues (fair, there's no books on it).
Deleted the author folder containing the only pokemon book (and emptied recycle bin). Again deleted cache files. Reinserted SD card into ereader, booted up the reader, it spins its arrows for a few minutes rebuilding its cache as expected.
Plugged into Calibre, error reappears. Beginning to suspect SD card corruption. There's not even three months on this SD card, it's a 16gb SanDisk Ultra and there's still 14gb free on it, but on the other hand I did buy it from Amazon so. Ran fsck on the SD card, no major issues, still can't open Sony Reader/database/cache.xml.
Any clues, folks?