Unable to connect to Kobo Glo

Bug #1598017 reported by Philip Yant
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
David Forrester

Bug Description

After installing last week's update and again after installing this week's (2.61), I am unable to connect with my Kobo Glo (from 2013). I receive message "Error communicating with device" with details:

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

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

Tags: kobo-driver
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1598017

Changing the component for this bug.

 assignee davidfor
 tag kobo-driver
 status triaged

Changed in calibre:
assignee: nobody → David Forrester (davidfor)
status: New → Triaged
Revision history for this message
David Forrester (davidfor) wrote :

I made a lot of changes to the KoboTouch driver in version 2.60. Most of them were in the configuration. The error you are seeing is in the code to migrate the configuration. Can you try opening the driver configuration? If you can, make a change to something in it and save the change. This should fix the configuration and the device should connect properly.

If this doesn't work, you will need to delete the existing configuration. This is in the file "device_drivers_KOBOTOUCH.py" in the calibre configuration directory. Delete this when calibre is not running. Then configure the driver before connecting the device.

Revision history for this message
Philip Yant (philip-yant) wrote : RE: [Bug 1598017] Re: Unable to connect to Kobo Glo
Download full text (3.7 KiB)

Again, thanks for the quick reply. This is a bit out of my depth. I don't know what you mean by " Can you try opening the driver configuration". I opened Preferences, Advanced, Plugins and I see KoboTouch (2.2.0) with your name by it. I don't know if this is what you meant. If I try opening this, I get a similar error (whether the Kobo is attached or not):

calibre, version 2.61.0
ERROR: Unhandled exception: <b>IndexError</b>:list index out of range

calibre 2.61 embedded-python: True is64bit: False
Windows-8-6.2.9200 Windows ('32bit', 'WindowsPE')
('Windows', '8', '6.2.9200')
Python 2.7.9
Windows: ('8', '6.2.9200', '', 'Multiprocessor Free')
Successfully initialized third party plugins: DeDRM (6, 0, 9) && Kindle and Mobipocket DeDRM (0, 4, 5) && Inept Epub DeDRM (0, 1, 7) && BOL_NL (3, 8, 7) && Inept PDF DeDRM (0, 1, 5)
Traceback (most recent call last):
  File "site-packages\calibre\gui2\preferences\plugins.py", line 292, in customize_plugin
  File "site-packages\calibre\gui2\preferences\plugins.py", line 370, in modify_plugin
  File "site-packages\calibre\customize\__init__.py", line 154, in do_user_config
  File "site-packages\calibre\devices\kobo\driver.py", line 2792, in config_widget
  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 see the file you mention "device_drivers_KOBOTOUCH.py" but I haven't deleted that yet because I am not sure if I understand " Then configure the driver before connecting the device."

Thanks,
Philip
Zottegem, Belgium

-----Oorspronkelijk bericht-----
Van: <email address hidden> [mailto:<email address hidden>] Namens David Forrester
Verzonden: vrijdag 1 juli 2016 17:19
Aan: <email address hidden>
Onderwerp: [Bug 1598017] Re: Unable to connect to Kobo Glo

I made a lot of changes to the KoboTouch driver in version 2.60. Most of them were in the configuration. The error you are seeing is in the code to migrate the configuration. Can you try opening the driver configuration? If you can, make a change to something in it and save the change. This should fix the configuration and the device should connect properly.

If this doesn't work, you will need to delete the existing configuration. This is in the file "device_drivers_KOBOTOUCH.py" in the calibre configuration directory. Delete this when calibre is not running. Then configure the driver before connecting the device.

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1598017

Title:
  Unable to connect to Kobo Glo

Status in calibre:
  Triaged

Bug description:
  After installing last week's update and again after installing this
  week's (2.61), I am unable to connect with my Kobo Glo (from 2013). I
  receive message "Error communicating with device" with details:

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

  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 _book...

Read more...

Revision history for this message
David Forrester (davidfor) wrote :

Yes, you have understood me correctly. The KoboTouch driver is used for communicating with Kobo Touch and later Kobo devices. Opening the configuration will migrate the settings in the same way as connecting the device. Once it is opened, pressing the OK will save the configuration in the new format. If the configuration dialog does open with the error, it might migrate some of the configuration so that you don't lose all of the current configuration. But, it will probably just have the default options.

Deleting the file will also change the settings back to the defaults. You should open the configuration and change it to suit you.

But, before fixing this, could post a copy of device_drivers_KOBOTOUCH.py? I can see exactly where the error is happening, but I cannot reproduce it. I'd like to look at the file to see what exactly is wrong with it

Revision history for this message
Philip Yant (philip-yant) wrote :
Revision history for this message
Philip Yant (philip-yant) wrote :

I've attached the file to the bug report (again, poking around to discover how to do that). Just to be sure, I'll paste it here. I've never touched the configuration; I didn't know it existed. In Calibre, this configuration does not open at all but others, such as Kobo Reader, do open without error.

For now, I'll not do anything more until I hear from you.

Philip

-----Oorspronkelijk bericht-----
Van: <email address hidden> [mailto:<email address hidden>] Namens David Forrester
Verzonden: zaterdag 2 juli 2016 06:41
Aan: <email address hidden>
Onderwerp: [Bug 1598017] Re: Unable to connect to Kobo Glo

Yes, you have understood me correctly. The KoboTouch driver is used for communicating with Kobo Touch and later Kobo devices. Opening the configuration will migrate the settings in the same way as connecting the device. Once it is opened, pressing the OK will save the configuration in the new format. If the configuration dialog does open with the error, it might migrate some of the configuration so that you don't lose all of the current configuration. But, it will probably just have the default options.

Deleting the file will also change the settings back to the defaults.
You should open the configuration and change it to suit you.

But, before fixing this, could post a copy of device_drivers_KOBOTOUCH.py? I can see exactly where the error is happening, but I cannot reproduce it. I'd like to look at the file to see what exactly is wrong with it

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1598017

Title:
  Unable to connect to Kobo Glo

Status in calibre:
  Triaged

Bug description:
  After installing last week's update and again after installing this
  week's (2.61), I am unable to connect with my Kobo Glo (from 2013). I
  receive message "Error communicating with device" with details:

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

  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/calibre/+bug/1598017/+subscriptions

Revision history for this message
Philip Yant (philip-yant) wrote :
Download full text (3.6 KiB)

(Sorry that the address in From is not always <email address hidden>; the account is registered in my wife's name.)

A side comment: I also have Calibre installed on a Linux machine. I don't use this Calibre any more, but I keep it up-to-date. There, I can open the configuration file without error. I have not done it, but it is possible for me to copy the file from the Linux machine to the Windows machine.

(I don't use the Linux Calibre any more because I was having problems with losing all my Calibre-installed files from my Kobo every time I connected. There were other reasons to use the Windows computer but few for using the Linux with Calibre, so I stoped but I do have it installed.)

Thanks,
Philip Yant
<email address hidden>
Zottegem, Belgium

-----Oorspronkelijk bericht-----
Van: Carla Timmermans [mailto:<email address hidden>]
Verzonden: zaterdag 2 juli 2016 09:56
Aan: 'Bug 1598017'
Onderwerp: RE: [Bug 1598017] Re: Unable to connect to Kobo Glo

I've attached the file to the bug report (again, poking around to discover how to do that). Just to be sure, I'll paste it here. I've never touched the configuration; I didn't know it existed. In Calibre, this configuration does not open at all but others, such as Kobo Reader, do open without error.

For now, I'll not do anything more until I hear from you.

Philip

-----Oorspronkelijk bericht-----
Van: <email address hidden> [mailto:<email address hidden>] Namens David Forrester
Verzonden: zaterdag 2 juli 2016 06:41
Aan: <email address hidden>
Onderwerp: [Bug 1598017] Re: Unable to connect to Kobo Glo

Yes, you have understood me correctly. The KoboTouch driver is used for communicating with Kobo Touch and later Kobo devices. Opening the configuration will migrate the settings in the same way as connecting the device. Once it is opened, pressing the OK will save the configuration in the new format. If the configuration dialog does open with the error, it might migrate some of the configuration so that you don't lose all of the current configuration. But, it will probably just have the default options.

Deleting the file will also change the settings back to the defaults.
You should open the configuration and change it to suit you.

But, before fixing this, could post a copy of device_drivers_KOBOTOUCH.py? I can see exactly where the error is happening, but I cannot reproduce it. I'd like to look at the file to see what exactly is wrong with it

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1598017

Title:
  Unable to connect to Kobo Glo

Status in calibre:
  Triaged

Bug description:
  After installing last week's update and again after installing this
  week's (2.61), I am unable to connect with my Kobo Glo (from 2013). I
  receive message "Error communicating with device" with details:

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

  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", li...

Read more...

Revision history for this message
David Forrester (davidfor) wrote :

Thanks for the file. I can see what is happening and why. This simple answer is that it has been a very long time since you changed the driver configuration. It is missing some options. The configuration migration code isn't checking for this.

I will fix this, but it will be to late for you. I recommend deleting the file device_drivers_KOBOTOUCH.py while calibre is closed. The default settings will be used and everything will be OK. You current configuration has:
- "Save template": {author_sort}/{title} - {authors}
- "Collections Column": #myshelves
- "Create Collections" is checked.

I think the save template is the default and if you don't use collections, you will be OK with using the default configuration.

Kovid Goyal (kovid)
Changed in calibre:
status: Triaged → Fix Committed
Revision history for this message
Philip Yant (philip-yant) wrote :

Thanks for looking into this. Yes, it seems I last updated that configuration in May 2013 when I added shelves for Kobo. I had not thought about configuration since then.

What I have done is to copy the file from my Linux machine to my Windows machine. When I restarted Calibre and attached my Kobo, everything worked fine, and I still had my custom Kobo shelves. I can now open the configuration in Preferences without an error message.

Thanks again,
Philip Yant

-----Oorspronkelijk bericht-----
Van: <email address hidden> [mailto:<email address hidden>] Namens David Forrester
Verzonden: zaterdag 2 juli 2016 12:00
Aan: <email address hidden>
Onderwerp: [Bug 1598017] Re: Unable to connect to Kobo Glo

Thanks for the file. I can see what is happening and why. This simple answer is that it has been a very long time since you changed the driver configuration. It is missing some options. The configuration migration code isn't checking for this.

I will fix this, but it will be to late for you. I recommend deleting the file device_drivers_KOBOTOUCH.py while calibre is closed. The default settings will be used and everything will be OK. You current configuration has:
- "Save template": {author_sort}/{title} - {authors}
- "Collections Column": #myshelves
- "Create Collections" is checked.

I think the save template is the default and if you don't use collections, you will be OK with using the default configuration.

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1598017

Title:
  Unable to connect to Kobo Glo

Status in calibre:
  Triaged

Bug description:
  After installing last week's update and again after installing this
  week's (2.61), I am unable to connect with my Kobo Glo (from 2013). I
  receive message "Error communicating with device" with details:

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

  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/calibre/+bug/1598017/+subscriptions

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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