calibre will not sync metadata or upload new files to Kobo Mini

Bug #1198248 reported by steven poore on 2013-07-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
David Forrester

Bug Description

Running Windows XP & Calibre 0.9.37

After Kobo Mini is detected and scanned for files on device, Calibre attempts to sync metadata. The following error occurs:
ERROR: Error: Error communicating with device

[Errno 22] Invalid argument

Traceback (most recent call last):
  File "site-packages\calibre\gui2\device.py", line 85, in run
  File "site-packages\calibre\gui2\device.py", line 506, in _sync_booklists
  File "site-packages\calibre\devices\kobo\driver.py", line 881, in sync_booklists
  File "site-packages\calibre\devices\usbms\driver.py", line 391, in sync_booklists
  File "site-packages\calibre\devices\usbms\driver.py", line 390, in write_prefix
  File "site-packages\calibre\ebooks\metadata\book\json_codec.py", line 123, in encode_to_file
IOError: [Errno 22] Invalid argument

After this it is impossible to send further files to the Kobo Mini. Any attempt to do so is met with this error:
ERROR: Error: Error communicating with device

(2, 'GetDiskFreeSpace', 'The system cannot find the file specified.')

Traceback (most recent call last):
  File "site-packages\calibre\gui2\device.py", line 85, in run
  File "site-packages\calibre\gui2\device.py", line 557, in _upload_books
  File "site-packages\calibre\devices\kobo\driver.py", line 1812, in upload_books
  File "site-packages\calibre\devices\usbms\driver.py", line 256, in upload_books
  File "site-packages\calibre\devices\usbms\device.py", line 986, in _sanity_check
  File "site-packages\calibre\devices\usbms\device.py", line 177, in free_space
  File "site-packages\calibre\devices\usbms\device.py", line 134, in _windows_space
error: (2, 'GetDiskFreeSpace', 'The system cannot find the file specified.')

Changing the component for this bug.

 assignee davidfor
 tag kobo-driver
 status triaged

Changed in calibre:
assignee: nobody → David Forrester (davidfor)
status: New → Triaged
David Forrester (davidfor) wrote :

From memory, the last time I saw the first error, it was because of a book with an unusual character in its name. But, anything that calibre has sent to the device should have an OK name. Have you manually sideloaded something since the last time you used calibre?

The second makes me think the connection to the Mini has been lost. That could be the cause for the first error, but is more likely a side effect.

Can you do some checks?

Firstly, connect the Mini without calibre running. Then check you can see the drive for the device and copy a file to it. It doesn't matter what you copy, it is just to make sure Windows is seeing the device properly.

Secondly, without the Mini connected, start calibre and the restart in debug mode. This is done by right clicking on the preferences button and selecting "Restart in debug mode". Calibre will restart and display a message about a log file. Then connect the Mini and wait for the initial sync jobs to finish. Or the error you see above. Then close calibre. The debug log will be opened in Notepad. Post the full contents of the log.

steven poore (sxeve) wrote :
Download full text (5.6 KiB)

David

As far as I can remember everything I have added to the device has been by either Calibre or the Kobo's own wireless downloading. I'd have to take some more time to see whether any of the files use peculiar characters in the filename.

As far as the tests go, the first test worked fine. Windows "sees" the device and I can move files onto it with no problem.

The second test: error log etc listed below.

Many thanks

Steve

calibre Debug log
calibre 0.9.37 isfrozen: True is64bit: False
Windows-XP-5.1.2600-SP3 Windows ('32bit', 'WindowsPE')
('Windows', 'XP', '5.1.2600')
Python 2.7.4
Windows: ('XP', '5.1.2600', 'SP3', 'Multiprocessor Free')
Starting up...
Started up in 25.67 seconds with 1373 books
Job: 1 Get device information started
DeviceJob: 1 Get device information done, calling callback
DeviceJob: 1 Get device information callback returned
Job: 2 Get list of books on device started
DEBUG: 0.0 KoboTouch:books - oncard='None'
DEBUG: 0.0 KoboTouch:books - oncard='None', prefix='G:\'
DEBUG: 0.0 Kobo device: Kobo Mini
DEBUG: 0.0 Version of driver: (2, 0, 12) Has kepubs: True
DEBUG: 0.0 Version of firmware: (2, 6, 1) Has kepubs: True
DEBUG: 0.1 KoboTouch:books - opts.extra_customization= [u'', False, False, True, False, False, False, False, False, True, False, u'']
DEBUG: 0.1 KoboTouch:books - prefs['manage_device_metadata']= on_connect
DEBUG: 0.1 KoboTouch:books - set_debugging_title to ''
DEBUG: 0.1 KoboTouch:books - length bl=0
exception during JSON decode_from_file
Traceback (most recent call last):
  File "site-packages\calibre\ebooks\metadata\book\json_codec.py", line 163, in decode_from_file
  File "json\__init__.py", line 290, in load
  File "json\__init__.py", line 351, in loads
  File "json\decoder.py", line 365, in decode
  File "json\decoder.py", line 383, in raw_decode
ValueError: No JSON object could be decoded
DEBUG: 0.2 KoboTouch:books - length bl after sync=0
DEBUG: 0.2 KoboTouch:books - reading device database
DEBUG: 0.2 Database Version=79
DEBUG: 0.2 KoboTouch:books - shelf list: [u'Doctor Who', u'Fantasy', u'Science Fiction', u'Classics', u'Plays', u'Terry Pratchett']
DEBUG: 0.3 KoboTouch:books - query= SELECT Title, Attribution, DateCreated, ContentID, MimeType, ContentType, ImageID, ReadStatus, ___ExpirationStatus, FavouritesIndex, Accessibility, IsDownloaded, Series, SeriesNumber, ___UserID, ExternalId FROM content where BookID is Null and ((Accessibility = -1 and IsDownloaded in ('true', 1 )) or (Accessibility in (1,2) and IsDownloaded in ('true', 1)) ) and not ((___ExpirationStatus=3 or ___ExpirationStatus is Null) and ContentType = 6) AND (externalId IS NULL OR externalId = '') AND contentId NOT LIKE 'file:///mnt/sd/%'
Job: 1 Get device information finished
No details available.
DEBUG: 881.0 KoboTouch:books - automatically managing metadata
DEBUG: 881.0 KoboTouch:books - about to sync_booklists
DEBUG: 881.0 USBMS: starting sync_booklists
DEBUG: 890.9 USBMS: finished sync_booklists
DEBUG: 890.9 KoboTouch:books - have done sync_booklists
DEBUG: 890.9 KoboTouch:books - end - oncard='None'
DEBUG: 890.9 Kob...

Read more...

Sylvia van der Velde (isrem) wrote :
Download full text (4.0 KiB)

I have the same problem with a Kobo Glow. I get a different error:
calibre, version 2.61.0
FEHLER: Fehler: Fehler bei der Kommunikation mit dem Gerät

list index out of range

Traceback (most recent call last):
  File "site-packages\calibre\gui2\device.py", line 87, in run
  File "site-packages\calibre\gui2\device.py", line 503, in _books
  File "site-packages\calibre\devices\kobo\driver.py", line 1418, in books
  File "site-packages\calibre\devices\kobo\driver.py", line 2961, in get_debugging_title
  File "site-packages\calibre\devices\kobo\driver.py", line 2804, in get_pref
  File "site-packages\calibre\devices\kobo\driver.py", line 2869, in settings
  File "site-packages\calibre\devices\kobo\driver.py", line 3091, in migrate_old_settings
IndexError: list index out of range

I restarted Calibre in debug mode, this is the log file:

calibre Fehlerdiagnoseprotokoll
calibre 2.61 embedded-python: True is64bit: False
Windows-7-6.1.7601-SP1 Windows ('32bit', 'WindowsPE')
32bit process running on 64bit windows
('Windows', '7', '6.1.7601')
Python 2.7.9
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Starting up...
Started up in 11.82 seconds with 62 books
Storage number map:
{(7L, 0L): [(1L, 'C'), (2L, 'D'), (3L, 'E')], (7L, 1L): [(1L, 'G')]}
Storage number for USBSTOR\DISK&VEN_KOBO&PROD_EREADER-3.19.576&REV_0110\N437532000183&0: StorageDeviceNumber(type=7L, number=1L, partition_number=0L)
Drive letters for USBDevice(vendor_id=0x2237 product_id=0x4223 bcd=0x110 devid=usb\vid_2237&pid_4223&rev_0110 devinst=3516)
{u'drive_letters': ['G'],
 u'pnp_id_map': {'G': u'\\\\?\\usbstor#disk&ven_kobo&prod_ereader-3.19.576&rev_0110#n437532000183&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}'},
 u'readonly_drives': set([]),
 u'sort_map': {'G': (1L, 1L)}}
Job: 1 Geräteinformationen erhalten started
DeviceJob: 1 Geräteinformationen erhalten done, calling callback
DeviceJob: 1 Geräteinformationen erhalten callback returned
Job: 2 Bibliotheksinformationen festlegen started
DeviceJob: 2 Bibliotheksinformationen festlegen done, calling callback
DeviceJob: 2 Bibliotheksinformationen festlegen callback returned
Job: 3 Liste der Bücher auf dem Gerät erhalten started
DEBUG: 0.0 KoboTouch:books - oncard='None'
DEBUG: 0.0 KoboTouch::migrate_old_settings - start
DEBUG: 0.0 KoboTouch::migrate_old_settings - settings need to be migrated
DEBUG: 0.0 KoboTouch::migrate_old_settings - settings.collections_columns= Perry Rhodan
DeviceJob: 3 Liste der Bücher auf dem Gerät erhalten done, calling callback
list index out of range

Traceback (most recent call last):
  File "site-packages\calibre\gui2\device.py", line 87, in run
  File "site-packages\calibre\gui2\device.py", line 503, in _books
  File "site-packages\calibre\devices\kobo\driver.py", line 1418, in books
  File "site-packages\calibre\devices\kobo\driver.py", line 2961, in get_debugging_title
  File "site-packages\calibre\devices\kobo\driver.py", line 2804, in get_pref
  File "site-packages\calibre\devices\kobo\driver.py", line 2869, in settings
  File "site-packages\calibre\devices\kobo\driver.py", line 3091, in migrate_old_settings
IndexError: list index out of range

DeviceJob: 3 Liste der Bücher auf dem ...

Read more...

Eli Schwartz (eschwartz) wrote :

Sylvia van der Velde,

No, you do not have the same problem. As indicated by the fact that you have a different error.

Your problem is bug 1598017 which is already fixed and the fix will be in the next release (calibre 2.62.0)

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

Other bug subscribers