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 04-10-2012, 08:05 AM   #1
kindlethefire
Member
kindlethefire doesn't litterkindlethefire doesn't litter
 
Posts: 11
Karma: 100
Join Date: Apr 2012
Device: Kindle Keyboard & Paperwhite
Error when trying to transfer contents to Calibre

Calibre: all .7 and .8 versions - others not tried
Calibre successfully installed (no errors) with:
Quote:
sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main()"
OS: Ubuntu 10.04
Kindle 3

Hi,
Calibre recognizes a device is connected. But:
1. "Show books in main memory .." displays nothing
2. Transferring books to Calibre gives the error:
Quote:
calibre, version 0.8.46
WARNING: Failed to read metadata: Failed to read metadata from the following:

Kindle
Traceback (most recent call last):
File "site-packages/calibre/gui2/add.py", line 127, in start
File "site-packages/calibre/gui2/add.py", line 221, in add
File "site-packages/calibre/gui2/add.py", line 232, in add_formats
IOError: [Errno 21] Is a directory: u'/media/Kindle'
The documents folder is mounted in /media/Kindle/documents

This is extremely frustrating - any help would be very much appreciated.

David
kindlethefire is offline   Reply With Quote
Old 04-10-2012, 08:10 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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre-debug -g
kovidgoyal is offline   Reply With Quote
Old 04-10-2012, 09:42 AM   #3
kindlethefire
Member
kindlethefire doesn't litterkindlethefire doesn't litter
 
Posts: 11
Karma: 100
Join Date: Apr 2012
Device: Kindle Keyboard & Paperwhite
Output is long and repeating - I have deleted repeating lines:
Quote:
File "re.py", line 190, in compile
File "re.py", line 245, in _compile
error: redefinition of group name u'author' as group 2; was group 1
Traceback (most recent call last):
File "site-packages/calibre/devices/usbms/driver.py", line 186, in update_booklist
File "site-packages/calibre/devices/usbms/driver.py", line 482, in book_from_path
File "site-packages/calibre/devices/kindle/driver.py", line 76, in metadata_from_path
File "site-packages/calibre/devices/usbms/driver.py", line 475, in metadata_from_formats
File "site-packages/calibre/devices/usbms/driver.py", line 417, in build_template_regexp
File "re.py", line 190, in compile
File "re.py", line 245, in _compile
error: redefinition of group name u'author' as group 2; was group 1 .... (repeated many times)
david@ubuntu-lucid64:
From file capture output to file:
Quote:
Starting up...
Started up in 0.91 seconds with 0 books
Job: 1 Get device information started
DeviceJob: 1 Get device information done, calling callback
DeviceJob: 1 Get device information callback returned
Job: 2 Get list of books on device started
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None
DEBUG: 0.0 USBMS: dirs are: /media/Kindle/ documents
DEBUG: 0.0 USBMS: scan from root False /media/Kindle/documents
DEBUG: 0.4 USBMS: count found in cache: 0, count of files in metadata: 0, need_sync: False
DEBUG: 0.4 USBMS: Finished fetching list of books from device. oncard= None
DEBUG: 0.4 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
DEBUG: 0.4 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb
DeviceJob: 2 Get list of books on device done, calling callback
DeviceJob: 2 Get list of books on device callback returned
Job: 1 Get device information finished
No details available.
Job: 2 Get list of books on device finished
No details available.
Note: It is a Kindle 3G - has a keyboard. Reported above as Kindle 2 ??

Many thanks,
David
kindlethefire is offline   Reply With Quote
Old 04-10-2012, 09:43 AM   #4
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You've got an invalid template either in preferences->send to device or for the kindle plugin in preferences->plugins.
kovidgoyal is offline   Reply With Quote
Old 04-10-2012, 10:18 AM   #5
kindlethefire
Member
kindlethefire doesn't litterkindlethefire doesn't litter
 
Posts: 11
Karma: 100
Join Date: Apr 2012
Device: Kindle Keyboard & Paperwhite
Just as a user, how would I find the invalid template?
I can't recall changing anything other than running 'initial setup'.
Many thanks
kindlethefire is offline   Reply With Quote
Old 04-10-2012, 10:49 AM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by kindlethefire View Post
Just as a user, how would I find the invalid template?
I can't recall changing anything other than running 'initial setup'.
Many thanks
Preferences: Send to Device (and/or Save to disk. Or Plugins: Device drivers: <your reader model> )

the template looks something like: {authors} - {title} no matter which place is getting used. (the first and last are the common ones when pressing the Send to Device button. The Middle one is used when Save to Disk)

Your template can vary to taste, but it must be valid

Last edited by kovidgoyal; 04-10-2012 at 10:53 AM.
theducks is offline   Reply With Quote
Old 04-10-2012, 11:42 AM   #7
kindlethefire
Member
kindlethefire doesn't litterkindlethefire doesn't litter
 
Posts: 11
Karma: 100
Join Date: Apr 2012
Device: Kindle Keyboard & Paperwhite
I installed calibre 'out of the box' - i.e. using the linux install command.
I don't know anything about templates - never modified, written or played with any.

Are you referring to books I have or calibre?

I'm sorry - I'm totally confused where I should be looking and at what sort of document.

David
kindlethefire is offline   Reply With Quote
Old 04-10-2012, 12:06 PM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The offending template is in one of two places:
1) preferences -> Sending books to device. Halfway down the page there is a box labeled "Save template".
2) preferences -> plugins -> device plugins -> kindle file then click "customize". There will be a template box a bit down the page.

One or both of the templates will contain "authors" twice, or will contain both "authors" and "author_sort".

You can probably make the error go away by checking preferences -> adding books -> read metadata from file contents instead of file name. The downside of this change is that importing books will be slower.
chaley is offline   Reply With Quote
Old 04-11-2012, 04:17 AM   #9
kindlethefire
Member
kindlethefire doesn't litterkindlethefire doesn't litter
 
Posts: 11
Karma: 100
Join Date: Apr 2012
Device: Kindle Keyboard & Paperwhite
Thanks for the replies.
Quote:
The offending template is in one of two places:
1) preferences -> Sending books to device. Halfway down the page there is a box labeled "Save template".
Here I have: {author_sort}/{title} - {authors} which is the default. Is that OK?
Quote:
2) preferences -> plugins -> device plugins -> kindle file then click "customize". There will be a template box a bit down the page.
With the word 'Device' I can only find 'Device Interface plug-ins'. Is that the one? My top level choices are:
Catalogue genertaor ..
Conversion Input ..
Conversion output ..
Device Interface plug-ins
File type ..
Input profile ..
Metadata reader ..
Metadata source ..
Metadata writer ..
Output profile ..
Preferences ..
Store ..
User Interface Action ..
ePub Fixer
Kindle 2/3/4 has mobi, azw1, azw4, azw; Read metadata from files on device and Use subdirectories are all selected.

Result: no change in behaviour.

So I ran in debug mode. The log reads:
Quote:
calibre Debug log
calibre 0.8.46
Linux-2.6.32-40-generic-x86_64-with-debian-squeeze-sid
Linux
('Linux', '2.6.32-40-generic', '#87-Ubuntu SMP Tue Mar 6 00:56:56 UTC 2012')
Python 2.7.1
Linux: ('debian', 'squeeze/sid', '')
Starting up...
Job: 1 Get device information started
DeviceJob: 1 Get device information done, calling callback
DeviceJob: 1 Get device information callback returned
Job: 2 Get list of books on device started
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None
DEBUG: 0.0 USBMS: dirs are: /media/Kindle/ documents
DEBUG: 0.0 USBMS: scan from root False /media/Kindle/documents
Started up in 13.77 seconds with 0 books
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Job: 1 Get device information finished
No details available.
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Worker Launch took: 0.246156930923
Failed to read MOBI cover
Failed to read MOBI cover
Job: 3 Read metadata (0 of 1) finished
Read metadata (0 of 1)

Added Kindle to db in: 0.100504159927 seconds
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
Failed to read MOBI cover
DEBUG: 19.9 USBMS: count found in cache: 0, count of files in metadata: 144, need_sync: True
DEBUG: 19.9 USBMS: starting sync_booklists
DEBUG: 20.0 USBMS: finished sync_booklists
DEBUG: 20.0 USBMS: Finished fetching list of books from device. oncard= None
DEBUG: 20.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
DEBUG: 20.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb
DeviceJob: 2 Get list of books on device done, calling callback
DeviceJob: 2 Get list of books on device callback returned
Job: 2 Get list of books on device finished
No details available.
I have deleted /opt/calibre and searched for all files /folders with calibre in the name and deleted them. Re-installed - same problem. But - I note that forcing run Welcome Wizard remembers my datsabase location, email etc - so there is at least one configuration file not being deleted.

Many thanks,
David
kindlethefire is offline   Reply With Quote
Old 04-11-2012, 04:31 AM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
According to that debug log, calibre found 144 books on your device and did not produce the exception described in post 3.
Code:
DEBUG: 19.9 USBMS: count found in cache: 0, count of files in metadata: 144, need_sync: True
You should see these books in calibre's device view. Do you?

Note that the "Failed to read MOBI cover" is not a fatal error, probably caused by the books being infested with Amazon's DRM (Digital Rights Management).
chaley is offline   Reply With Quote
Old 04-11-2012, 04:37 AM   #11
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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
rm -rf ~/.config/calibre && calibre
kovidgoyal is offline   Reply With Quote
Old 04-11-2012, 05:16 AM   #12
kindlethefire
Member
kindlethefire doesn't litterkindlethefire doesn't litter
 
Posts: 11
Karma: 100
Join Date: Apr 2012
Device: Kindle Keyboard & Paperwhite
Hi chaley,
no books show in calibre. All Authors, Languages, Series, Formats etc show (0).
Something in re-install must have helped - calibre-debug -g now shows:
Quote:
$ calibre-debug -g
Starting up...
Started up in 0.79 seconds with 0 books
Job: 1 Get device information started
DeviceJob: 1 Get device information done, calling callback
DeviceJob: 1 Get device information callback returned
Job: 2 Get list of books on device started
DEBUG: 0.0 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= None
DEBUG: 0.0 USBMS: dirs are: /media/Kindle/ documents
DEBUG: 0.3 USBMS: scan from root False /media/Kindle/documents
DEBUG: 0.3 USBMS: count found in cache: 144, count of files in metadata: 144, need_sync: False
DEBUG: 0.3 USBMS: Finished fetching list of books from device. oncard= None
DEBUG: 0.3 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= carda
DEBUG: 0.3 USBMS: Fetching list of books from device. Device= KINDLE2 oncard= cardb
DeviceJob: 2 Get list of books on device done, calling callback
DeviceJob: 2 Get list of books on device callback returned
Job: 2 Get list of books on device finished
No details available.
Job: 1 Get device information finished
No details available.
Thanks kovidgoyal,
I'll uninstall with that and then reinstall and post back.

David
kindlethefire is offline   Reply With Quote
Old 04-11-2012, 07:04 AM   #13
kindlethefire
Member
kindlethefire doesn't litterkindlethefire doesn't litter
 
Posts: 11
Karma: 100
Join Date: Apr 2012
Device: Kindle Keyboard & Paperwhite
Hi
I now am able, for the first time ever, to see the contents of my Kindle Main Memory.

Having got so far I don't want to mess things up so please let me ask what I know is in the User guide but ask for for your input:
I have my list of books on my Kindle.
I would like to:
automatically add to calibre db ignoring duplicates (books already there in any format). I only want to convert formats manually.
sort by authour or title at will.
What is the _best_ way to achieve this, please, as I presume changing default behaviour changes templates?

Many thanks,
David

PS - I can see 72 books in my kindle in the calibre screen - there are 61 .azw and .mobi books and 1 text file on the kindle??

Last edited by kindlethefire; 04-11-2012 at 07:21 AM.
kindlethefire is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibre, version 0.8.8 ERROR: Error: Error communicating with device no such column: e-bookuser Devices 1 07-03-2011 04:09 PM
Calibre Conversion for Table of Contents rewilkins8 Conversion 5 06-03-2011 10:50 AM
How to do Table of Contents in Calibre? Killian Conversion 29 05-09-2011 03:05 PM
Calibre can't read Kindle contents AmandaReckonwith Devices 3 03-26-2011 05:21 AM
'operation failed due to an error' ebook library doesn't read prs505 contents billper Sony Reader 9 04-30-2009 02:06 PM


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


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