![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2025
Device: PRS-505
|
Sudden and stubborn "Error communicating with device" on a PRS-505
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 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? Last edited by CavemanJoe; 02-28-2025 at 11:19 AM. Reason: firmware clarification |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,612
Karma: 145863177
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Run the latest version of calibre. If it is a problem with calibre, it won't get fixed in an old version. Run the newest calibre and if it still fails, then post the log.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2025
Device: PRS-505
|
Oh dang, I thought I was on the latest! Right, let's give that a whirl...
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2025
Device: PRS-505
|
I thought I was being so thorough lol
Right, I'm still getting the error message on a freshly-updated Calibre, here it is: Code:
calibre, version 7.26.0 ERROR: Error: Error communicating with device Document is empty, line 1, column 1 (<string>, line 1) Traceback (most recent call last): File "calibre/gui2/device.py", line 112, in run File "calibre/gui2/device.py", line 563, in _books File "calibre/devices/prs505/driver.py", line 199, in books File "calibre/devices/prs505/driver.py", line 194, in initialize_XML_cache File "calibre/devices/prs505/sony_cache.py", line 116, in __init__ File "calibre/utils/xml_parse.py", line 26, in safe_xml_fromstring File "src/lxml/etree.pyx", line 3287, in lxml.etree.fromstring File "src/lxml/parser.pxi", line 1989, in lxml.etree._parseMemoryDocument File "src/lxml/parser.pxi", line 1869, in lxml.etree._parseDoc File "src/lxml/parser.pxi", line 1105, in lxml.etree._BaseParser._parseUnicodeDoc File "src/lxml/parser.pxi", line 633, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 743, in lxml.etree._handleParseResult File "src/lxml/parser.pxi", line 672, in lxml.etree._raiseParseError File "<string>", line 1 lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1 |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,296
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That error indicates teh XML database on the device is empty. Resetting the device should recreate it.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2025
Device: PRS-505
|
Reset meaning a factory reset? The cache.xml file on the SD card is 63.7kb.
(further data point; plugging this SD card into a different PRS-505 and then attempting to connect to that ereader via Calibre prompts the same error, so the problem's definitely on the SD card) |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,296
Karma: 27111240
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Since you dont think the problem is in the SD card itself, resetting the reader will eliminate any software issues that might have crept into its firmware. Otherwise try a different SD card or use the reader main memory.
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2025
Device: PRS-505
|
For anyone else having this same problem, this was a corrupted SD card. Reformatting it in Ubuntu's Disks utility (using the "Erase" option) resolved the error, but who knows for how long. Meanwhile I've ordered a couple new SD cards - straight from the manufacturer's site this time. Fingers crossed.
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Jan 2025
Device: PRS-505
|
Anyone else searching for this problem twenty years from now, part of the problem is that even though the ereader can "see" a 16gb card, once you go over 4 gigs things get really screwy. Took me a lot of frustrated experimentation and many hours trawling fifteen-year-dead forum threads to figure that out lol.
Apparently Sony decided not to mount the SD card (in the traditional Linux use of the term "mount") but instead use some convoluted custom way of reading it in order to maximize battery life. After repartitioning the SD card so that it's got a 3.9 gig FAT32 ebooks partition and then twelve gigs of Nothing At All, I've just loaded it up to the absolute brim and had it index the whole lot with no SD card weirdness. Since I've started this thread I've been replacing batteries and cleaning up and handing these ereaders out to my friends and family, and everyone loves the feel of these things. Despite this SD card mystery I'm still very much in love with mine; sure sometimes it takes a few seconds to open a book and I've gotta take a booklight to bed with me, but it's hard to grumble at an aluminium case, three weeks between charges, and Buttons Galore! I've got a guide in progress for folk who are still in love with these things and want to continue reading books on them eighteen years after they were made, I'll come back and link to it here once it's finished. Thanks for your good work on Calibre, kovidgoyal! |
![]() |
![]() |
![]() |
#10 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,772
Karma: 168959602
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
It's possible that your PRS-505 is only capable of handling the original SD card format. Though the original SD card was only good up to 2GB while the later SDHC, SDXC and SDUC cards could go to 32GB, 2TB and 128TB respectively so being able to use 4GB is a bit of an oddity.
|
![]() |
![]() |
![]() |
#11 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,882
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
There was/is a 4G limit, but not all hosts specced for 2G could handle 4G. There are non-SDHC 4G cards.
I have one device sold before the SDXC cards existed that had it in the firmware, correctly, so it works with a 512G card. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Error communicating with device" on Kobo Clara w Koreader | jd2733 | Devices | 2 | 01-17-2021 10:45 AM |
Error communicating with device: "CorruptError: database disk image is malformed" | maxxal22 | Calibre | 4 | 08-26-2020 08:03 AM |
"Error communicating with device" and/or books sent to Kindle did not show up | catkin | Devices | 3 | 11-17-2019 09:30 PM |
Glo Calibre/Kobo Glo "error communicating with device." | ryuji35 | Kobo Reader | 81 | 12-04-2017 05:42 PM |
PRS-505 Error communicating with device | zexzex | Calibre | 3 | 07-25-2010 04:24 PM |