Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-06-2010, 06:08 PM   #31
dantaipan
Enthusiast
dantaipan began at the beginning.
 
Posts: 29
Karma: 10
Join Date: May 2010
Device: kobo
Thanks Tim, I tried the update unfortunately now I get this:

local variable 'ImageID' referenced before assignment

Traceback (most recent call last):
File "site-packages\calibre\gui2\device.py", line 58, in run
File "site-packages\calibre\gui2\device.py", line 308, in _delete_books
File "<string>", line 269, in delete_books
File "<string>", line 227, in delete_via_sql
UnboundLocalError: local variable 'ImageID' referenced before assignment

D
dantaipan is offline   Reply With Quote
Old 06-06-2010, 06:36 PM   #32
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by dantaipan View Post
Thanks Tim, I tried the update unfortunately now I get this:

local variable 'ImageID' referenced before assignment

Traceback (most recent call last):
File "site-packages\calibre\gui2\device.py", line 58, in run
File "site-packages\calibre\gui2\device.py", line 308, in _delete_books
File "<string>", line 269, in delete_books
File "<string>", line 227, in delete_via_sql
UnboundLocalError: local variable 'ImageID' referenced before assignment

D
I saw that just today on a Windows machine that I have but the same delete worked fine on Linux. I will look into it but I don't have a build environment on Windows.

Tim
timlegge is offline   Reply With Quote
Advert
Old 06-07-2010, 12:42 AM   #33
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Sorry about the cross post - I thought this might better in this thread....

Deleting Kobo files from my Kobo Reader works nicely, but I get an error message when I try and delete an EPUB book.

I am using .7 and the June 1 Kobo driver. I don't seem to be able to copy the error to the clip board either. All I get when I paste is "Error Communicating with Device".

Many thanks
John in Sunny Carnarvon - Western Australia
JBlyth is offline   Reply With Quote
Old 06-07-2010, 05:52 AM   #34
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by JBlyth View Post
Sorry about the cross post - I thought this might better in this thread....

Deleting Kobo files from my Kobo Reader works nicely, but I get an error message when I try and delete an EPUB book.

I am using .7 and the June 1 Kobo driver. I don't seem to be able to copy the error to the clip board either. All I get when I paste is "Error Communicating with Device".

Many thanks
John in Sunny Carnarvon - Western Australia
grab the latest version from the thread. I removed the old version so any you grab should be correct. There was a bug that I resolved yesterday related to not havind a sd card installed.
timlegge is offline   Reply With Quote
Old 06-07-2010, 08:05 AM   #35
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Quote:
Originally Posted by timlegge View Post
grab the latest version from the thread. I removed the old version so any you grab should be correct. There was a bug that I resolved yesterday related to not havind a sd card installed.
Hi Tim,

I got the version updated with the kobo_plugin.py file dated 06-06-10. Sadly the problem deleting the EPUB file remains the same. Just in case - I have no SD inserted.....

I note that when I use the original default plugin, I was able to delete EPUBs very nicely.....

Cheers - and the best of luck!
John
JBlyth is offline   Reply With Quote
Advert
Old 06-07-2010, 08:15 AM   #36
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by JBlyth View Post
Hi Tim,

I got the version updated with the kobo_plugin.py file dated 06-06-10. Sadly the problem deleting the EPUB file remains the same. Just in case - I have no SD inserted.....

I note that when I use the original default plugin, I was able to delete EPUBs very nicely.....

Cheers - and the best of luck!
John
Hi

Is the message the same or are you now seeing a different problem.

Tim
timlegge is offline   Reply With Quote
Old 06-07-2010, 08:21 AM   #37
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Quote:
Originally Posted by timlegge View Post
Hi

Is the message the same or are you now seeing a different problem.

Tim
Same error message as posted earlier. Same line numbers etc....

Cheers
John
JBlyth is offline   Reply With Quote
Old 06-07-2010, 09:04 AM   #38
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by JBlyth View Post
Same error message as posted earlier. Same line numbers etc....

Cheers
John
Hi

Did you remove the old version of the plugin? Also, if possible open the zip file, extract the kobo_plugin.py file and see if line 267 which references a sd card is commented out. It is possible that I uploaded the wrong version of the plugin again.

Tim
timlegge is offline   Reply With Quote
Old 06-07-2010, 09:15 AM   #39
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Quote:
Originally Posted by timlegge View Post
Hi

Did you remove the old version of the plugin? Also, if possible open the zip file, extract the kobo_plugin.py file and see if line 267 which references a sd card is commented out. It is possible that I uploaded the wrong version of the plugin again.

Tim
Hi Tim,

Yes, I started off from a complete new install, including removing the folders left in the AppData folder.

The line 267 does appear to be commented out....


ContentID = path
ContentID = ContentID.replace(self._main_prefix, "file:///mnt/onboard/")
# ContentID = ContentID.replace(self._card_a_prefix, "file:///mnt/sd/")
# print "ContentID: " + ContentID
ImageID = self.delete_via_sql(ContentID, ContentType)

Cheers
John
JBlyth is offline   Reply With Quote
Old 06-07-2010, 10:14 AM   #40
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by JBlyth View Post
Hi Tim,

Yes, I started off from a complete new install, including removing the folders left in the AppData folder.

The line 267 does appear to be commented out....


ContentID = path
ContentID = ContentID.replace(self._main_prefix, "file:///mnt/onboard/")
# ContentID = ContentID.replace(self._card_a_prefix, "file:///mnt/sd/")
# print "ContentID: " + ContentID
ImageID = self.delete_via_sql(ContentID, ContentType)

Cheers
John
Okay, there is no way that should happen. I will take a look at it tonight.

Tim
timlegge is offline   Reply With Quote
Old 06-07-2010, 10:28 PM   #41
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
Quote:
Originally Posted by dantaipan View Post
Thanks Tim, I tried the update unfortunately now I get this:

local variable 'ImageID' referenced before assignment

Traceback (most recent call last):
File "site-packages\calibre\gui2\device.py", line 58, in run
File "site-packages\calibre\gui2\device.py", line 308, in _delete_books
File "<string>", line 269, in delete_books
File "<string>", line 227, in delete_via_sql
UnboundLocalError: local variable 'ImageID' referenced before assignment

D
I found the issue. You tried to delete a book that you copied to the device without ejecting the device first and reconnecting it. The driver relies on the kobo to correctly update its database with the required rows but that only happens with a disconnect.

I have added code to address the issue but it needs more review/testing before it is ready for a release. Maybe tomorrow night.

Tim
timlegge is offline   Reply With Quote
Old 06-07-2010, 11:21 PM   #42
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Quote:
Originally Posted by timlegge View Post
I found the issue. You tried to delete a book that you copied to the device without ejecting the device first and reconnecting it. The driver relies on the kobo to correctly update its database with the required rows but that only happens with a disconnect.

I have added code to address the issue but it needs more review/testing before it is ready for a release. Maybe tomorrow night.

Tim
Ah ha!

I was not aware of that small point - I will try and do better in future ;-)

I'm looking forward to the update....

Cheers
John
JBlyth is offline   Reply With Quote
Old 06-08-2010, 12:47 AM   #43
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Still having problems deleting EPUBs

Hi Tim,

I tried again - but with a similar error code this time.

1. Added a Book to Calibre from Digital Editions
2. Sent it to the device
3. Removed the Koko Reader
4. Inserted the Kobo Reader
5. Tried a delete
6. Got this slightly different error message
7. Still can't copy the error to the clipboard....


Hope this helps....

Cheers
John

Last edited by JBlyth; 06-08-2010 at 12:49 AM. Reason: Incorrect image address
JBlyth is offline   Reply With Quote
Old 06-08-2010, 02:22 AM   #44
JBlyth
Connoisseur
JBlyth doesn't litterJBlyth doesn't litter
 
Posts: 97
Karma: 126
Join Date: May 2010
Location: Carnarvon - Western Australia
Device: Kobo, Kobo Touch, Ipaq 214, HTC WildFire Android
Stranger and Stranger....

It actually appears that the book has been deleted from the Kobo Reader's "database", but remains both on the Reader (physically) and the in Calibre database on the PC....

[Added later] However, it remains in the metadata.calibre file on the Kobo, I see

Hope this points you in the right direction, Tim.

Cheers
John

Last edited by JBlyth; 06-08-2010 at 02:27 AM. Reason: More information for Tim!
JBlyth is offline   Reply With Quote
Old 06-08-2010, 09:12 PM   #45
timlegge
Addict
timlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than momtimlegge loves his/her reader more than mom
 
Posts: 305
Karma: 78651
Join Date: May 2010
Location: New Brunswick, Canada
Device: Kobo, Kobo Wifi, Kobo Touch
I have attached a new version of the plugin to the first message in this thread (and deleted all the others). It seems to work on both Linux and Windows for my test cases (add-delete, add-eject-connect-delete, save books to disk)...

The only issue I currently know about is that the library does not update the on device status when you delete a book from the device.

If this resolves most outstanding issues I may take some time to simplify the code (I guess I will do that either way...

Changes in this are mostly related to path separators (linux vs Windows). I also added code to allow the delete to continue if a book is not found in the sqlite database (likely because it was deleted immediately after it was added or at least before the device was disconnected)

The path separator issue affected most of the issues. If you see any issues, it would be helpful to know which OS and what the calibre display showed the path to be for the file.
Tim

Last edited by timlegge; 06-08-2010 at 09:14 PM. Reason: add more info
timlegge is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Calibre Kobo Driver allows deleting of Kobo Free books timlegge Kobo Reader 46 08-27-2011 10:16 PM
Updated Kobo driver in Calibre 0.7.5 timlegge Kobo Reader 22 06-29-2010 08:14 AM
Calibre now has Kobo driver ! taming Kobo Reader 18 05-27-2010 07:36 PM
Beta Beta Test of Major New Features Starson17 Calibre 45 05-17-2010 10:55 AM
New Kobo driver bug Stinger Calibre 6 05-17-2010 09:47 AM


All times are GMT -4. The time now is 12:00 PM.


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