Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 07-26-2018, 04:02 AM   #1
dmp1991
Junior Member
dmp1991 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2018
Device: android phone
Android Phone / MTP error

I'm getting the following 100% consistently when trying to connect my new Android phone to my Calibre running on a Mac via a USB cable. I've verified that:
* Calibre is updated to latest release 3.28.0
* My phone is unlocked when connected
* I change my phone to "Transfer files" mode (it looks like they dropped the MTP suffix on this option, though they kept PTP on "Transfer Photos (PTP)".)
* I have no "Android File Transfer" software installed, though I used to prior to today.
* My phone is not rooted.

As soon as Calibre detects my device it starts a couple jobs. Get Device Information, which succeeds. Set library information, which also succeeds. And then Get list of books on device, which can take anywhere from 7.5 mins to 12 mins (I have no idea for the varyability here!) to scan but this always ends up with an error state where the job details are the below.

I'm assuming the "PTP" mentions in the error message are bogus as the stack trace clearly shows this as the "devices/mtp/unix/driver.py" generating the error.

What's interesting to me is that even though this error is shown, my "Internal shared storage" dir ends up containing a 'driveinfo.calibre' file after it claims it couldn't be written. I've tried both ejecting and reconnecting again, and also deleting that file and trying again. But I always get another error.

Anyone have any ideas what's going on and how to workaround / fix this?


Failed to upload file named: driveinfo.calibre to (u'Internal shared storage',): 2:PTP Layer error 02ff: send_file_object_info(): Could not send object info.
2:Error 02ff: PTP: I/O error

Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 87, in run
File "site-packages/calibre/gui2/device.py", line 510, in _books
File "site-packages/calibre/devices/mtp/driver.py", line 218, in books
File "site-packages/calibre/devices/mtp/driver.py", line 190, in get_driveinfo
File "site-packages/calibre/devices/mtp/driver.py", line 180, in _update_drive_info
File "site-packages/calibre/devices/mtp/driver.py", line 151, in put_calibre_file
File "site-packages/calibre/devices/mtp/base.py", line 26, in synchronizer
File "site-packages/calibre/devices/mtp/unix/driver.py", line 403, in put_file
DeviceError: Failed to upload file named: driveinfo.calibre to (u'Internal shared storage',): 2:PTP Layer error 02ff: send_file_object_info(): Could not send object info.
2:Error 02ff: PTP: I/O error

dmp1991 is offline   Reply With Quote
Old 07-26-2018, 04:26 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The only cure I know of for that error is to reset the device. Oh and you can reduce the scan time after a successful connect by right clicking the device icon in calibre and choosing configure this device and restricting what folders on the device are scanned.
kovidgoyal is online now   Reply With Quote
Old 07-26-2018, 05:43 AM   #3
dmp1991
Junior Member
dmp1991 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2018
Device: android phone
I can't reduce the scan time through the mechanism you say, well at least not easily, because that config has no options unless the device is connected AND as soon as the device connects the scan begins and everything else you'd like to do tells you it can't be done while a job is in progress. If I wait for that to job to finish, I finally can get an editable config dialog but now when I click the button to allow me to choose what folders to scan the list is completely empty! I have nothing to select or check or etc.

Before I reset (which means wipe and reinstall to me) my phone, I'm going to try rebooting everything. I haven't tried that yet.
dmp1991 is offline   Reply With Quote
Old 08-06-2018, 04:59 PM   #4
dmp1991
Junior Member
dmp1991 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2018
Device: android phone
Just to follow-up (sorry for the delay!) rebooting my phone fixed the problem. I guess Calibre isn't compatible with whatever state my phone had been left in when I previously connected my phone's USB to a laptop for other file sharing.
dmp1991 is offline   Reply With Quote
Old 09-17-2018, 01:48 AM   #5
dmp1991
Junior Member
dmp1991 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2018
Device: android phone
Well, having the problem again with the latest version of Calibre (3.31.0) and now rebooting the phone doesn't fix it. I've tried deleting the files driveinfo.calibre and metadata.calibre again. I've rebooted the phone, restarted Calibre, and then tried to connect again -- same problem.

Here's the error message:

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

Failed to upload file named: driveinfo.calibre to (u'Internal shared storage',): 2:PTP Layer error 2008: send_file_object_info(): Could not send object info.
2:Error 2008: PTP: Invalid Storage ID

Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 87, in run
File "site-packages/calibre/gui2/device.py", line 510, in _books
File "site-packages/calibre/devices/mtp/driver.py", line 218, in books
File "site-packages/calibre/devices/mtp/driver.py", line 190, in get_driveinfo
File "site-packages/calibre/devices/mtp/driver.py", line 180, in _update_drive_info
File "site-packages/calibre/devices/mtp/driver.py", line 151, in put_calibre_file
File "site-packages/calibre/devices/mtp/base.py", line 26, in synchronizer
File "site-packages/calibre/devices/mtp/unix/driver.py", line 403, in put_file
DeviceError: Failed to upload file named: driveinfo.calibre to (u'Internal shared storage',): 2:PTP Layer error 2008: send_file_object_info(): Could not send object info.
2:Error 2008: PTP: Invalid Storage ID

Not sure why it's complaining about PTP, it looks to be using the MTP Device Interface 1.0.0 plugin, at least my device info shows up under that plugin's configuration page.

Pixel
Serial number: ...
Manufacturer: Google
Model: Pixel
ids: (20, 21, 6353, 20193, u'...')
Device version: 1.0
Storage:
[{'capacity': 120574005248L,
'freespace_bytes': 83889422336L,
'freespace_objects': 1073741824L,
'id': 65537,
'name': 'Internal shared storage',
'removable': False,
'rw': True,
'volume_id': None}]

Last edited by dmp1991; 09-17-2018 at 02:05 AM.
dmp1991 is offline   Reply With Quote
Old 09-17-2018, 02:31 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Make sure your phone is not locked/MTP transfersa re not disallowed. And it talks about PTP because libmtp is based on a whole bunch of old PTP code underneath.
kovidgoyal is online now   Reply With Quote
Old 09-17-2018, 04:52 PM   #7
dmp1991
Junior Member
dmp1991 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2018
Device: android phone
Quote:
Originally Posted by kovidgoyal View Post
Make sure your phone is not locked/MTP transfersa re not disallowed.
I've never heard of locking or disallowing MTP transfers. Any idea how to check for that?
dmp1991 is offline   Reply With Quote
Old 09-17-2018, 05:22 PM   #8
dmp1991
Junior Member
dmp1991 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2018
Device: android phone
After a bit of research, I've gone into Developer Options and made sure that File Transfer (aka MTP) mode is allowed for USB connections. It was already set that way and I was sure to pick File Transfer mode via the prompt after connecting my USB cable.
dmp1991 is offline   Reply With Quote
Old 09-17-2018, 08:36 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Then the only other suggestions I have are reset the phone or use a wireless transfer method https://manual.calibre-ebook.com/faq...kindle-fire-hd
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Fire giving "invalid MTP path" error Deadser Devices 2 06-29-2017 05:22 PM
Calibre won't see my Android MTP device, File system sees it fine. (linux) setherd Devices 8 08-02-2014 06:12 AM
I only see a driveinfo.calibre file in my MTP android tablet. duxtin Devices 2 10-06-2013 07:54 PM
Cool little Windows Phone 7 Demo for iOS/Android phone users kjk News 13 12-02-2011 07:59 AM
Recognition for azbooka n516, android tablet and android phone vyazovoi Devices 3 08-13-2011 01:32 AM


All times are GMT -4. The time now is 09:38 AM.


MobileRead.com is a privately owned, operated and funded community.