Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-15-2007, 04:55 PM   #1
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
libprs500 on openSuse 10.3?

Aloha,

Where is an appropriate place to ask for help to install libprs500 on linux? I installed prerequisites, and the easy-install process completes, but the postinstall script fails as does running the installed commands:

Code:
# easy_install-2.5 -U TTFQuery libprs500
Searching for TTFQuery
Reading http://cheeseshop.python.org/pypi/TTFQuery/
Reading http://members.rogers.com/mcfletch/
Reading https://sourceforge.net/project/showfiles.php?group_id=84080
Reading http://cheeseshop.python.org/pypi/TTFQuery/1.0.0
Best match: TTFQuery 1.0.0
Downloading http://downloads.sourceforge.net/ttfquery/TTFQuery-1.0.0.zip?modtime=1079827200&big_mirror=0
Processing TTFQuery-1.0.0.zip
Running TTFQuery-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-76AaPS/TTFQuery-1.0.0/egg-dist-tmp-r2u_V-
warning: no previously-included files matching '*CVS*' found anywhere in distribution
warning: no previously-included files matching '*Cvs*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.ttf' found anywhere in distribution
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files matching '*.bat' found anywhere in distribution
zip_safe flag not set; analyzing archive contents...
ttfquery._scriptregistry: module references __file__
Adding TTFQuery 1.0.0 to easy-install.pth file

Installed /usr/local/lib64/python2.5/site-packages/TTFQuery-1.0.0-py2.5.egg
Processing dependencies for TTFQuery
Finished processing dependencies for TTFQuery
Searching for libprs500
Reading http://cheeseshop.python.org/pypi/libprs500/
Reading http://libprs500.kovidgoyal.net
Reading http://cheeseshop.python.org/pypi/libprs500/0.4.30
Best match: libprs500 0.4.30
Downloading http://pypi.python.org/packages/2.5/l/libprs500/libprs500-0.4.30-py2.5.egg#md5=3bef7a4eb26f470d308cecad930dcf45
Processing libprs500-0.4.30-py2.5.egg
Moving libprs500-0.4.30-py2.5.egg to /usr/local/lib64/python2.5/site-packages
Adding libprs500 0.4.30 to easy-install.pth file
Installing lrf-meta script to /usr/local/bin
Installing lit-meta script to /usr/local/bin
Installing pdf-meta script to /usr/local/bin
Installing rtf-meta script to /usr/local/bin
Installing web2lrf script to /usr/local/bin
Installing isbndb script to /usr/local/bin
Installing any2lrf script to /usr/local/bin
Installing pdf2lrf script to /usr/local/bin
Installing lrf2lrs script to /usr/local/bin
Installing web2disk script to /usr/local/bin
Installing html2lrf script to /usr/local/bin
Installing markdown-libprs500 script to /usr/local/bin
Installing libprs500_postinstall script to /usr/local/bin
Installing prs500 script to /usr/local/bin
Installing txt2lrf script to /usr/local/bin
Installing lit2lrf script to /usr/local/bin
Installing rtf2lrf script to /usr/local/bin
Installing lrfviewer script to /usr/local/bin
Installing libprs500 script to /usr/local/bin

Installed /usr/local/lib64/python2.5/site-packages/libprs500-0.4.30-py2.5.egg
Processing dependencies for libprs500
Finished processing dependencies for libprs500

# libprs500_postinstall
Traceback (most recent call last):
  File "/usr/local/bin/libprs500_postinstall", line 8, in <module>
    load_entry_point('libprs500==0.4.30', 'console_scripts', 'libprs500_postinstall')()
  File "/usr/lib64/python2.5/site-packages/pkg_resources.py", line 277, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib64/python2.5/site-packages/pkg_resources.py", line 2179, in load_entry_point
    return ep.load()
  File "/usr/lib64/python2.5/site-packages/pkg_resources.py", line 1912, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "build/bdist.linux-i686/egg/libprs500/linux.py", line 24, in <module>
  File "/usr/lib64/python2.5/site-packages/PIL/__init__.py", line 20, in devices

  File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 56, in <module>
  File "build/bdist.linux-i686/egg/libprs500/devices/libusb.py", line 19, in <module>
  File "/usr/lib64/python2.5/site-packages/ctypes/__init__.py", line 20, in <module>
    raise Exception, ("Version number mismatch", __version__, _ctypes_version)
Exception: ('Version number mismatch', '1.0.1', '1.0.2')
I'm very familiar with linux in general, but not so much with python setuptools. It appears that there's a problem with the ctypes version, but I'm not sure which version is which or what should be done to correct it.

Running any of the installed commands results in the same error:

Code:
# libprs500
Traceback (most recent call last):
  File "/usr/local/bin/any2lrf", line 8, in <module>
    load_entry_point('libprs500==0.4.30', 'console_scripts', 'any2lrf')()
  File "/usr/lib64/python2.5/site-packages/pkg_resources.py", line 277, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib64/python2.5/site-packages/pkg_resources.py", line 2179, in load_entry_point
    return ep.load()
  File "/usr/lib64/python2.5/site-packages/pkg_resources.py", line 1912, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/any/convert_from.py", line 24, in <module>
  File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/rtf/convert_from.py", line 22, in <module>
  File "build/bdist.linux-i686/egg/libprs500/libwand.py", line 15, in <module>
  File "/usr/lib64/python2.5/site-packages/ctypes/__init__.py", line 20, in <module>
    raise Exception, ("Version number mismatch", __version__, _ctypes_version)
Exception: ('Version number mismatch', '1.0.1', '1.0.2')
Any helpful advice or a link to an appropriate forum/list would be very welcome!
mauibay is offline   Reply With Quote
Old 12-15-2007, 06:00 PM   #2
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
Sorry to respond to myself, but I did get past this problem by using easy-install to update python-ctypes. I wanted to post in case anybody else bumps into the same issue since openSuse doesn't have ctypes 1.0.2 in any repositories, the most recent is 1.0.1.

So, I apparently have libprs500 working now, although have not had any luck with NYT Fetch News script, the hourglass has been spinning for about half an hour now.

I'm impressed with the features and polish so far! I'm hoping that entering the same tags for multiple files will create a collection on the prs505, or that there is some method for grouping books into collections that I haven't found yet.

Thanks!
mauibay is offline   Reply With Quote
 
Advertisement
Old 12-15-2007, 06:10 PM   #3
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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah entering tags creates collections on the device.
kovidgoyal is offline   Reply With Quote
Old 12-16-2007, 12:41 AM   #4
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
ok, I'm stumped how to make collections. I'm sure I must be missing something obvious.

I'm editing the metadata for the books in libprs500, and setting the 'Tags' field to the author's name. All the other metadata is populated from the ISBNdb lookup. I select all the books and click the 'Save to disk' button and save to my SD card. What I want to test is for a collection to appear containing all the books by the same author.

When I insert the SD card in my prs505, the books appear in the title and author lists, but the number of collections is still zero. Also, the books are sorted in the title and author lists based on the actual filename, not the metadata, so many are not in the correct places. I didn't expect that. but can easily fix it by adopting an appropriate filename scheme.

But what's the trick to get the prs505 to generate the collections from the tags I enter in libprs500? I'd really like to not have to enter the xml playlist info in the cache file on the SD card by hand, it would be great if there is some way to generate it from libprs500 or get the prs505 to generate it automatically from the tags.

What am I misunderstanding?

Thanks!
mauibay is offline   Reply With Quote
Old 12-16-2007, 02:48 AM   #5
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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You have to use send to device if you want metadata to be transferred. Click the arrow next to the send to device button to choose the card as the destination.
kovidgoyal is offline   Reply With Quote
Old 12-16-2007, 04:12 AM   #6
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
Sorry, I didn't realize saving to the card was different than saving to the device. I was thinking that I would only need to save directly to the device if I wasn't using a card or wanted to save to internal memory.

Well I guess I need to figure out why I can't send to the device then. That button is disabled, so I can't choose a destination. On my system libprs500 doesn't see my prs505, these are the errors when it starts up:

Code:
Unable to open device
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/libprs500/gui2/device.py", line 52, in run
  File "build/bdist.linux-i686/egg/libprs500/devices/prs505/driver.py", line 219, in open
  File "build/bdist.linux-i686/egg/libprs500/devices/prs505/driver.py", line 188, in open_linux
DeviceError: Unable to find PRS505. Is it connected?
I have a 512MB memory stick and a 2GB SD card inserted in the device. The device is plugged in and visible with lsusb, and both cards are detected and automounted by KDE:

Code:
# lsusb
Bus 002 Device 008: ID 054c:031e Sony Corp.

#df -h
/dev/sdi1             469M   96K  469M   1% /media/disk
/dev/sdj1             1.9G   35M  1.9G   2% /media/disk-1
So, as far as I can tell, the device is connected and operating normally. I can drag/drop files to it and read the contents of the mounted cards just fine.

Perhaps there is a library or dependency that I'm missing?
mauibay is offline   Reply With Quote
Old 12-16-2007, 04:18 AM   #7
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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Run libprs500_postinstall as root
kovidgoyal is offline   Reply With Quote
Old 12-16-2007, 04:58 AM   #8
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
Bingo! That did the trick. Obviously I either forgot to run it or something went wrong the first time after I fixed the ctypes version issue.

Thanks for all your quick responses, you've done a great job with this software! I just made a donation to your paypal account. I appreciate your help!
mauibay is offline   Reply With Quote
Old 12-16-2007, 05:34 AM   #9
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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Thanks
kovidgoyal is offline   Reply With Quote
Old 12-16-2007, 05:07 PM   #10
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
I did let the NY Times script run for over an hour and it finally completed. Wow. Nice results, but that's a long time. It would be really nice to be able to have a command line method to run these scripts so they could be fired off from a cron job.

I have also successfully converted PDF and RTF files to LRF, but every TXT file I've tried so far has frozen the app and I've had to kill the process to close it. It still says 'Jobs: 0" when it hangs and the window goes unresponsive. I didn't expect that, I thought TXT would be the easiest to convert from. Perhaps TXT files need a specific encoding?
mauibay is offline   Reply With Quote
Old 12-16-2007, 06:05 PM   #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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Code:
web2lrf --help
Try running txt2lrf on the TXT files with the --verbose switch.
kovidgoyal is offline   Reply With Quote
Old 12-16-2007, 06:40 PM   #12
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
Code:
> txt2lrf --verbose Bear\,\ Greg\ -\ SLANT.txt
[INFO] convert_from.py:60: Converting text to HTML...
It doesn't seem to generate any files and doesn't exit. It shows as using 100% cpu in top. I've let it run up to 20 minutes before killing it manually.

Am I just not waiting long enough? RTF and PDF only take a few seconds to convert, I can't imagine TXT taking more than 20 minutes!
mauibay is offline   Reply With Quote
Old 12-16-2007, 09:06 PM   #13
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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm looks like a python-markdown issue. Open a ticket and attach the txt file.
kovidgoyal is offline   Reply With Quote
Old 12-16-2007, 09:23 PM   #14
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
Added ticket 392. My workaround is to simply convert text files to RTF or HTML with oowriter before adding to the libprs500 library, so no worries here.

The web2lrf feature is outstanding btw, thanks!
mauibay is offline   Reply With Quote
Old 12-16-2007, 09:53 PM   #15
mauibay
Member
mauibay began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Dec 2007
Device: prs-505
oops. I don't think I changed anything, but RTF conversions aren't working now either, only HTML:

Code:
Detailed traceback:
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/libprs500/gui2/jobs.py", line 97, in run
  File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/any/convert_from.py", line 140, in main
  File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/any/convert_from.py", line 117, in process_file
  File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/rtf/convert_from.py", line 85, in process_file
  File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/rtf/convert_from.py", line 178, in generate_html2
  File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/rtf/convert_from.py", line 125, in generate_xml
ImportError: No module named rtf2xml.ParseRtf
Log:
[INFO] convert_from.py:177: Converting RTF to XML...
I suspect there's something missing from openSuse's python packages, or something else weird.
mauibay is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre 0.7.22 not starting in openSUSE 11.3 cyberdude Calibre 2 10-10-2010 10:26 AM
Calibre Installation on opensuse 11.1 michaelbn Calibre 11 02-17-2010 04:01 PM
Install problems in openSUSE 11.2 thersites Calibre 5 01-07-2010 11:03 PM
seg fault and usb bus error for prs500 on OpenSuSE 11 khassounah Calibre 4 12-30-2008 11:04 PM
Help!!! libprs500 MountainMan Calibre 11 11-14-2007 12:25 AM


All times are GMT -4. The time now is 11:20 AM.


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