Ubuntu

some ebook readers not detected without calibre-mount-helper

Reported by Brian May on 2010-04-13
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
calibre (Debian)
Fix Released
Unknown
calibre (Ubuntu)
Medium
Martin Pitt

Bug Description

Binary package hint: calibre

This is in a lucid schroot, I also had similar issues with the version in Karmic.

(lucid)root@aquitard:/home/brian/tree/calibre# calibre-debug -d
Version: 0.6.42
USB devices on system:
[['0x45e',
  '0x53',
  '0x300',
  'Microsoft',
  'Microsoft 3-Button Mouse with IntelliEye(TM)',
  ''],
 ['0x8087', '0x20', '0x0', '', '', ''],
 ['0x1d6b',
  '0x2',
  '0x206',
  'Linux 2.6.31.9-lxc.1 ehci_hcd',
  'EHCI Host Controller',
  '0000:00:1a.0'],
 ['0x1d6b',
  '0x2',
  '0x206',
  'Linux 2.6.31.9-lxc.1 ehci_hcd',
  'EHCI Host Controller',
  '0000:00:1d.0'],
 ['0x1949', '0x3', '0x100', 'Amazon', 'Amazon Kindle', 'B005A0A29515045F']]
Looking for HANLINV3
Looking for HANLINV5
Looking for BLACKBERRY
Looking for CYBOOK
Looking for ILIAD
Looking for IREXDR1000
Looking for IREXDR800
Looking for JETBOOK
Looking for SHINEBOOK
Looking for POCKETBOOK360
Looking for KINDLE
Looking for KINDLE2
Looking for KINDLE_DX
 (6473, 3, 256, 'Amazon', 'Amazon Kindle', 'B005A0A29515045F')
Looking for NOOK
Looking for PRS505
Looking for PRS700
Looking for PRS500
Looking for ANDROID
Looking for N770
Looking for N810
Looking for COOL_ER
Looking for ESLICK
Looking for NUUT2
Looking for IRIVER_STORY
Looking for GER2
Looking for ITALICA
Looking for ECLICTO
Looking for DBOOK
Looking for INVESBOOK
Looking for BOOX
Looking for BOOQ
Looking for EB600
Looking for README
Looking for N516
Looking for EB511
Devices possibly connected: Kindle DX Device Interface,
Trying to open Kindle DX Device Interface ... failed
Opening of the following devices failed
<calibre.devices.kindle.driver.KINDLE_DX object at 0x40218d0>
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/devices/__init__.py", line 84, in debug
    dev.open()
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 621, in open
    self.open_linux()
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 594, in open_linux
    mp, ret = mount(main, 'main')
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 582, in mount
    ret = do_mount(node, label)
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 577, in do_mount
    _('Could not find mount helper: %s.')%cmd[0])
DeviceError: Could not find mount helper: calibre-mount-helper.

(lucid)root@aquitard:/home/brian/tree/calibre# dpkg -S calibre-mount-helper
dpkg: *calibre-mount-helper* not found.

Dana Olson (adolson) wrote :

Same issue here. I am using a Sony Reader 300 (PRS-300) that I just bought today.

S.Rey (s.rey) wrote :

It's the same here. (with a Sony PRS-300).

Kevin Clark (zamplify) wrote :

same here with this ending:

Devices possibly connected: PRS-300/505 Device Interface,
Trying to open PRS-300/505 Device Interface ... failed
Opening of the following devices failed
<calibre.devices.prs505.driver.PRS505 object at 0x89fcb0c>
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/devices/__init__.py", line 84, in debug
    dev.open()
  File "/usr/lib/calibre/calibre/devices/prs505/driver.py", line 68, in open
    Device.open(self)
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 621, in open
    self.open_linux()
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 605, in open_linux
    mp, ret = mount(card, typ)
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 582, in mount
    ret = do_mount(node, label)
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 577, in do_mount
    _('Could not find mount helper: %s.')%cmd[0])
DeviceError: Could not find mount helper: calibre-mount-helper.

Fabrice Coutadeur (fabricesp) wrote :

Hi,

I've packaged 0.6.49 for lucid and karmic: https://launchpad.net/~fabricesp/+archive/experimental/+packages
Can you install this package (as soon as it get built) and check if the problem still happens?

Thanks,
Fabrice

CB (christopherbrailsford) wrote :

Installed Fabrice Coutadeur's supposedly fixed package. It doesn't work. Same problem. Using PRS-300.

CB (christopherbrailsford) wrote :

Just done a manual install from the 0.6.51 binary installer into my home directory (not as root). Works perfectly, no device detection problems.

Changed in calibre (Ubuntu):
status: New → Confirmed
S.Rey (s.rey) wrote :

Installed from Fabrice's PPA. Same error as the lucid repository package.
(DeviceError: Could not find mount helper: calibre-mount-helper.)

Fabrice Coutadeur (fabricesp) wrote :

Ok. I've just published a new version with calibre-mount-helper. Can you check it's working fine?
Meanwhile, I will test with an old PRS 505, to check if I can reproduce the original problem.

Fabrice

S.Rey (s.rey) wrote :

OK, your new version works perfect on my PRS-300.

Here are the last lines of log. (I think that error it's only that it's trying to detect the SD card, which the PRS-300 doesn't have).

Devices possibly connected: PRS-300/505 Device Interface,
Trying to open PRS-300/505 Device Interface ... Unable to mount card (Error code: 1)
OK
Main memory: '/media/READER/'
Total space: (464928768L, 0, 0)

S.Rey (s.rey) wrote :

Any plans to fix the Calibre version on the official repository for Lucid?
Being this a LTS, it would be great to fix this broken package. It should be easy now that it's clear what the problem is, after seeing the Fabrice's ppa version works fine.

Eddy (krionic) wrote :

I'm with S.Rey. I'd like to see a firm release for Lucid on this one. Same issue here with my Sony PRS-300.

Martin Pitt (pitti) wrote :

We rely on the desktop's automounting for ebook storage volumes. Quite frankly, calibre-mount-helper is really not appropriate to ship, it's by and large an unsafe rewrite of the much better understood mechanisms that udisks and even hal already provide. It's not necessary for calibre to work either, once the OS automounts the storage volumes they will just appear automatically in calibre's UI.

Changed in calibre (Ubuntu):
status: Confirmed → Won't Fix
S.Rey (s.rey) wrote :

Maybe I'm missing something, but desktop automounting does work fine for the ebook. At least the PRS-300 is mounted as a massive storage volume.

The issue here is not that they are not mounted. The issue is they don't appear in the calibre UI.

I'm not comfortable with marking this as "Won't Fix". If package maintainers ubuntu developers feel that calibre-mount-helper is a wrong way to approach this, then at least a viable alternative would need to be suggested (and a new bug report would need to be filled).
Otherwise, having a calibre version which doesn't work for what it's intended makes no sense. I'd better remove it from the repository that having a broken version which is not intended to be fixed.

S.Rey (s.rey) on 2010-06-05
summary: - calibre-mount-helper missing
+ calibre-mount-helper missing (mounted devices do not appear on calibre
+ UI)

Odd, there is nothing in mount-helper which identifies particular hardware, it just mounts the device as mass-storage. So it seems it does not recognize your particular device. It's possible that support for your device was added after 0.6.42 (in Lucid) and is covered by the 0.6.49 version that Fabrice packaged.

summary: - calibre-mount-helper missing (mounted devices do not appear on calibre
- UI)
+ Amazon Kindle not detected
Changed in calibre (Ubuntu):
status: Won't Fix → New
summary: - Amazon Kindle not detected
+ Amazon Kindle [1949:0003] not detected

I have found this. The author points to a broken ubuntu package.
http://bugs.calibre-ebook.com/ticket/5467

About the bug renaming, should I file a new bug for the lack of detection of 'Sony PRS-300'?
I think the Kindle problem has the same origin (lack of calibre-mount-helper). The debug lines say it crystal clear (mine were exactly the same except for the affected device). The device is detected but the program fails when it doesn't found calibre-mount-helper.
So, being different devices affected, I think the bug name should be keep generic.
Could somebody confirm if other devices (apart from Kindle and PRS-300) are detected by the ubuntu packaged 0.6.42?

By the way, my device is detected by calibre 0.6.42, when it's installed with the binary installer from its home page, besides it always worked fine on windows with older calibre versions.

Martin Pitt (pitti) on 2010-06-07
summary: - Amazon Kindle [1949:0003] not detected
+ some ebook readers not detected without calibre-mount-helper
Martin Pitt (pitti) wrote :

S. Rey, I changed the bug title to be more general, since it seems to be the same root cause. It has always worked with my Sony PRS-505, and with my colleague's Kindle, so I still wonder what's different on your system.

Again, the upstream calibre-mount-helper is absolutely inadequate (and also unnecessary), and there is no way you can convince me to ship it in the official package. What I could do is to ship a small shell script with the same name instead which just calls udisks --mount, etc., or simply exit 0 (since the device is already automounted).

Can you please try this in a Terminal:

  echo -e '#!/bin/sh\nexit 0' | sudo tee /usr/bin/calibre-mount-helper
  sudo chmod 755 /usr/bin/calibre-mount-helper

This will create a dummy calibre-mount-helper which does nothing and avoid the error message. Does it work then?

Changed in calibre (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Sunjae Park (darehanl) wrote :

PRS300 user here. Tried creating the dummy script but seems the script is a bit more involved.

Unable to open device <calibre.devices.prs505.driver.PRS505 object at 0x92d640c>
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/device.py", line 106, in do_connect
    dev.open()
  File "/usr/lib/calibre/calibre/devices/prs505/driver.py", line 68, in open
    Device.open(self)
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 618, in open
    self.open_linux()
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 605, in open_linux
    mp, ret = mount(card, typ)
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 585, in mount
    return self.node_mountpoint(node)+'/', 0
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Connect to device failed, retrying in 5 seconds...
Unable to open device <calibre.devices.prs505.driver.PRS505 object at 0x92d640c>
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/device.py", line 106, in do_connect
    dev.open()
  File "/usr/lib/calibre/calibre/devices/prs505/driver.py", line 68, in open
    Device.open(self)
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 618, in open
    self.open_linux()
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 605, in open_linux
    mp, ret = mount(card, typ)
  File "/usr/lib/calibre/calibre/devices/usbms/device.py", line 585, in mount
    return self.node_mountpoint(node)+'/', 0
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Device connect failed again, giving up

Changed in calibre (Debian):
status: Unknown → New
Sunjae Park (darehanl) wrote :

Confirming that "exit 1" instead of 0 like the Debian bug report fixed my PRS300 problem.

Martin Pitt (pitti) wrote :

Thanks for testing! So, I'll put in that "exit 1" surrogate for now, and if we need something more complex, we can always extend it later on. I'm still puzzled why it breaks only for some people, though.

Changed in calibre (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Incomplete → In Progress
S.Rey (s.rey) wrote :

I confirm that the workaround works on my PRS-300 (using "exit 1" as per the Sunjae Park suggestion).

Martin Pitt (pitti) wrote :

Fixed in Debian packaging bzr. I ended up writing a simple shell script calling udisks --mount or eject.

Changed in calibre (Ubuntu):
status: In Progress → Fix Committed
Changed in calibre (Debian):
status: New → Fix Committed
Changed in calibre (Debian):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package calibre - 0.7.2+dfsg-1

---------------
calibre (0.7.2+dfsg-1) unstable; urgency=low

  * New major upstream version. See http://calibre-ebook.com/new-in/seven for
    details.
  * Refresh patches to apply cleanly.
  * debian/control: Bump python-cssutils to >= 0.9.7~ to ensure the existence
    of the CSSRuleList.rulesOfType attribute. This makes epub conversion work
    again. (Closes: #584756)
  * Add debian/local/calibre-mount-helper: Simple and safe replacement for
    upstream's calibre-mount-helper, using udisks --mount and eject.
    (Closes: #584915, LP: #561958)
 -- Ubuntu Archive Auto-Sync <email address hidden> Tue, 22 Jun 2010 08:40:14 +0100

Changed in calibre (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.