Philantrop/calibre-marvin-manager

Errors when exporting metadata from Calibre to Marvin: could not open file... & st_size

kas23 opened this issue · 5 comments

When trying to right-click on yellow rows and selecting "export metadata from Calibre to Marvin", I'm getting these errors. It causes Calibre to completely freeze, prompting a force quit of Calibre. About 10-20% of my book covers did not get exported onto my iPhone, so I "polished" the eBooks in Calibre and am attempting to export metadata from each book from Calibre to Marvin. The first error:

2013-10-11 20:19:29.022 Calibre[328:707] deliverNotificationWithTitle()
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
calibre 1.6 isfrozen: True is64bit: True
Darwin-12.5.0-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '12.5.0', 'Darwin Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; root:xnu-2050.48.11~1/RELEASE_X86_64')
Python 2.7.5
OSX: ('10.8.5', ('', '', ''), 'x86_64')
Traceback (most recent call last):
File "calibre_plugins.marvin_manager.book_status", line 1026, in dispatch_context_menu_event
File "calibre_plugins.marvin_manager.book_status", line 5666, in _update_metadata
File "calibre_plugins.marvin_manager.book_status", line 5495, in _update_marvin_metadata
File "calibre_plugins.marvin_manager.book_status", line 4371, in _issue_command
File "calibre_plugins.marvin_manager.book_status", line 4874, in _stage_command_file
File "site-packages/calibre/devices/idevice/libimobiledevice.py", line 634, in write
libiMobileDeviceIOException: u'could not open file for writing'

I also periodically this error periodically:

2013-10-11 16:21:18.099 Calibre[6967:707] deliverNotificationWithTitle()
usbmuxd_send: Error -1 when sending: Broken pipe
usbmuxd_send: Error -1 when sending: Broken pipe
calibre 1.6 isfrozen: True is64bit: True
Darwin-12.5.0-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '12.5.0', 'Darwin Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; root:xnu-2050.48.11~1/RELEASE_X86_64')
Python 2.7.5
OSX: ('10.8.5', ('', '', ''), 'x86_64')
Traceback (most recent call last):
File "calibre_plugins.marvin_manager.book_status", line 1026, in dispatch_context_menu_event
File "calibre_plugins.marvin_manager.book_status", line 5666, in _update_metadata
File "calibre_plugins.marvin_manager.book_status", line 5495, in _update_marvin_metadata
File "calibre_plugins.marvin_manager.book_status", line 4377, in _issue_command
File "calibre_plugins.marvin_manager.book_status", line 5904, in _wait_for_command_completion
File "calibre_plugins.marvin_manager.book_status", line 4398, in _localize_marvin_database
KeyError: u'st_size'

I am running Calibre 1.6 on OS X 10.8.5. Marvin is version 2.2. iOS reader applications pluggin is 1.2.1 and Marvin XD is 1.0.8.

A broken pipe error is a low-level error indicating that the plugin is unable to communicate with your iPhone.

I'm not yet sure what initially causes the communication error nor what fixes it. A very small percentage of plugin users have reported the problem, and I'm trying to pin down the source of the problem. Here are some things to try:

  • Disconnect your iPhone from your computer. Restart the computer, then restart the iPhone by pressing and holding the Home button and the Power button until you see the Apple logo, then release the buttons. After the device has restarted, reconnect the USB cable then retry the operation.
  • Try opening iTunes before launching calibre. Confirm that you see your iPhone in the list of connected devices. Then start calibre and retry the operation. If this step resolves the problem, then you should try the next step as well.
  • Restore the iOS system software on your computer. Here is a step-by-step guide from Apple describing the restore process.

Please try these steps and report back with any results for the benefit of other users in the future experiencing the same problem.

I tried your suggestions today (except for restoring my device, which is a brand new 5S) and sent metadata to Marvin for about 1500 books without any problems. I thought the issue was fixed until I got the following error. And this was before I even clicked on the Marvin XD button. It looks like it is an issue with Calibre or Marvin:

calibre, version 1.6.0
ERROR: Error: Error communicating with device

u'st_size'

Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 85, in run
File "site-packages/calibre/gui2/device.py", line 480, in _books
File "/var/folders/jg/kkbm2yds11lb_r4ycy01psxr0000gn/T/calibre_1.6.0_tmp_TTbGkn/VdFW6H_ios_local_db/Marvin_overlays.py", line 314, in books
KeyError: u'st_size'

The problem you're experiencing is in a low-level library called libiMobileDevice which is used to communicate with iDevices.

So far I've seen bug reports from a small number of users (~5) reporting the problem. I'm not yet sure what causes the problem nor what solves it. I need more information.

  • Did your brand new 5s come with 7.0 or 7.0.2 installed? Did you do an over the air update?
  • Was iTunes running when the error occurred?
  • How many books do you have installed in Marvin?

I haven't been able to reproduce the problem, so at this point the best I can do is ask bug reporters to try various things until I can narrow down the common denominator.

A couple of other approaches that may narrow down the possible solutions:

  • If your iPhone is connected to your computer through a USB hub, try connecting it directly to the computer.
  • Try a different USB cable.
  • Try reinstalling iTunes.
  • Do you have any other iDevices you can test with?

Closed, no followup.