10-21-2009, 01:05 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-600
|
IOError errno 5?
Code:
(5, 'Input/output error') Traceback (most recent call last): File "/usr/lib/calibre/calibre/gui2/device.py", line 57, in run self.result = self.func(*self.args, **self.kwargs) File "/usr/lib/calibre/calibre/gui2/device.py", line 224, in _upload_books metadata=metadata, end_session=False) File "/usr/lib/calibre/calibre/devices/prs505/driver.py", line 126, in upload_books self.put_file(infile, paths[-1], replace_file=True) File "/usr/lib/calibre/calibre/devices/usbms/cli.py", line 61, in put_file shutil.copyfileobj(infile, dest) File "/usr/lib/python2.6/shutil.py", line 30, in copyfileobj fdst.write(buf) IOError: [Errno 5] Input/output error |
10-21-2009, 10:24 AM | #2 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
An I/O error indicates calibre is not able to write files to the device. If you are transferring to a storage card,try a different one. If to the main memory, can you transfer files using windows explorer?
|
Advert | |
|
10-21-2009, 11:42 AM | #3 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-600
|
Sorry, it was late last night, and I apparently was too tired to leave a decent description of what was happening. Calibre manages to write _some_ of the ebook to the ereader. Generally it gets anywhere from 1 corrupted page up to about 40 pages and the 40th is corrupted.
I am on linux, so I mounted each drive the prs600 makes available, and I can write to everything except the fake cd drive it provides that has sony reader software on it (this being that it is a read-only device). |
10-21-2009, 12:02 PM | #4 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That would indicate a problem with your reader. calibre just uses standard file system calls to copy files to the reader drives.
|
10-21-2009, 02:56 PM | #5 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-600
|
How, if I can write to the device just by mounting it and writing to it with "cat > blah"... why can't calibre? They are using the same system calls I would assume.
|
Advert | |
|
10-21-2009, 04:54 PM | #6 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yeah calibre just uses fopen and write
One thing to check is with what options is the device being mounted |
10-21-2009, 08:36 PM | #7 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-600
|
Aha!
Ok, I figured out what I was doing wrong. Because I still put all my mounts in /mnt (I'm old school like that), I didn't notice that Calibre was mounting my reader over in /media/${NAME OF READER}. So there were these stale mount points that Calibre was trying to write to, and the device was mounted multiple times, and all sorts of shenanigans. Since I was testing the device on just the _latest_ mount point, the file descriptor still worked, wheras with the other mounts it was kinda best guess as to linux's behavior. Once I unmounted all the stale mount points, and started anew, the writes went through just fine My problem really was that when I hit "Quit" on Calibre, I just assumed it would be unmounting the device. I guess that assumption is wrong. If I didn't want it to unmount it, I probably would have just kept it in the tray though? This behavior was non-obvious to me, but I could just be naive. Thanks for your amazingly prompt responses, and thanks for calibre |
10-21-2009, 11:18 PM | #8 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre does not automatically unmount the device unless you click the eject button or unplug the device.
|
10-21-2009, 11:26 PM | #9 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-600
|
If you quit calibre, then unplug the device, it wont get unmounted.
|
10-22-2009, 12:16 PM | #10 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah I'm not going to write a systemservice that runs in the background to mount/unmount devices. That is the OSes job. The fact that linux has totally messed up USB device management is unfortunate, but not a problem that individual app writers should have to solve.
|
10-22-2009, 02:28 PM | #11 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-600
|
I would agree with you completely except that you do automatically mount the device, you just don't automatically unmount the device. So for me it would be easier if it was that neither automatic or both automatic. But whatevs, I know what the behavior is now, so it doesn't really matter.
|
10-22-2009, 02:36 PM | #12 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
After detecting the device calibre waits to see if the OS auto mounts it, only if it doesn't will calibre mount it.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
IOError: [Errno 22] Invalid argument | jkcoder | Calibre | 5 | 09-25-2010 09:28 AM |
Errno 13: permission denied errors | prophetik | Calibre | 12 | 05-15-2010 05:31 PM |
IOError: [Errno 13] Permission denied | s3ntient | Calibre | 3 | 02-20-2010 02:01 PM |
[Errno 2] in any2epub | deegee | Calibre | 0 | 12-14-2008 10:36 AM |
rtf2lrf shows IOError: [Errno 2] if special characters in filename | xixix | Sony Reader | 9 | 03-07-2008 01:44 AM |