Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : Beta testing libprs500's new GUI


Pages : 1 [2]

kovidgoyal
10-01-2007, 08:49 PM
The beta GUI has now been merged back into the main GUI as of version 0.4.0.

BrendenM
10-02-2007, 03:19 PM
I followed the installation instructions for Ubuntu Feisty for the regular version. I wanted to try the developmental version however it seems that in doing so I've borked my system up good.

I receive the following error when running python setup.py develop
Installed /home/me/personal/eBooks/Software/libprs500/src
Processing dependencies for libprs500==0.4.7
Trying to setup udev rules...
/bin/sh: udevstart: not found
* Reloading kernel event manager... [ OK ]
Setting up bash completion... failed
Traceback (most recent call last):
File "/home/meme/personal/eBooks/Software/libprs500/src/libprs500/linux.py", line 79, in setup_completion
from libprs500.gui2.lrf_renderer.main import option_parser as lrfviewerop
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/lrf_renderer/main.py", line 26, in <module>
from libprs500.gui2.dialogs.conversion_error import ConversionErrorDialog
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/dialogs/conversion_error.py", line 19, in <module>
from libprs500.gui2.dialogs.conversion_error_ui import Ui_ConversionErrorDialog
ImportError: cannot import name Ui_ConversionErrorDialog
Setting up desktop integration...


I don't know if that is a problem or can be ignore because I am using zsh, not bash. If it is ignorable then I have something else wrong because when I run libprs500 I get the following errors

Traceback (most recent call last):
File "/usr/bin/libprs500", line 8, in <module>
load_entry_point('libprs500==0.4.7', 'gui_scripts', 'libprs500')()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 236, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2097, in load_entry_point
return ep.load()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1830, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/main.py", line 33, in <module>
from libprs500.gui2.main_window import MainWindow
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/main_window.py", line 19, in <module>
from libprs500.gui2.dialogs.conversion_error import ConversionErrorDialog
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/dialogs/conversion_error.py", line 19, in <module>
from libprs500.gui2.dialogs.conversion_error_ui import Ui_ConversionErrorDialog
ImportError: cannot import name Ui_ConversionErrorDialog

kovidgoyal
10-02-2007, 04:04 PM
Looks like libprs500 was not installed correctly.

Post the output of

cat /usr/lib/python2.5/site-packages/easy-install.pth

BrendenM
10-03-2007, 11:02 AM
Looks like libprs500 was not installed correctly.

Post the output of

cat /usr/lib/python2.5/site-packages/easy-install.pth

Well I think I may have corrected some problems. I'm running Xubuntu and I had to manually update SIP and PyQT. I'm still getting the install errors and lrfviewer doesn't run but libprs500 does now.

Here's the contents of easy-install.pth

import sys; sys.__plen = len(sys.path)
./TTFQuery-1.0.0-py2.5.egg
/home/me/personal/eBooks/Software/libprs500/src
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)

kovidgoyal
10-03-2007, 12:31 PM
I see you've installed it from svn. I assume you ran make in the gui2 directory?

BrendenM
10-03-2007, 12:59 PM
I see you've installed it from svn. I assume you ran make in the gui2 directory?

Yep I ran make -C src/libprs500/gui2/ as written on the development page. No errors from that as far as I could see.

kovidgoyal
10-03-2007, 01:25 PM
So what error does lrfviewer give you?

BrendenM
10-03-2007, 02:38 PM
So what error does lrfviewer give you?

My mistake, forgot to include that sorry.


Traceback (most recent call last):
File "/usr/bin/lrfviewer", line 8, in <module>
load_entry_point('libprs500==0.4.7', 'console_scripts', 'lrfviewer')()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 236, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2097, in load_entry_point
return ep.load()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1830, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/lrf_renderer/main.py", line 26, in <module>
from libprs500.gui2.dialogs.conversion_error import ConversionErrorDialog
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/dialogs/conversion_error.py", line 19, in <module>
from libprs500.gui2.dialogs.conversion_error_ui import Ui_ConversionErrorDialog
ImportError: cannot import name Ui_ConversionErrorDialog

BrendenM
10-03-2007, 04:37 PM
Oversight. Will be in next version. You can choose all files for the moment.

Oops sorry forgot that output.


Traceback (most recent call last):
File "/usr/bin/lrfviewer", line 8, in <module>
load_entry_point('libprs500==0.4.7', 'console_scripts', 'lrfviewer')()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 236, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2097, in load_entry_point
return ep.load()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1830, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/lrf_renderer/main.py", line 26, in <module>
from libprs500.gui2.dialogs.conversion_error import ConversionErrorDialog
File "/home/me/personal/eBooks/Software/libprs500/src/libprs500/gui2/dialogs/conversion_error.py", line 19, in <module>
from libprs500.gui2.dialogs.conversion_error_ui import Ui_ConversionErrorDialog
ImportError: cannot import name Ui_ConversionErrorDialog

kovidgoyal
10-03-2007, 04:45 PM
Try running make again

BrendenM
10-03-2007, 05:08 PM
Try running make again

Okay updated to the newest SVN, 628.

Ran make -C src/libprs500/gui2/ and it initially said make: Nothing to be done for `all'.

So I did a make clean and tried again and now I'm getting lots of
pyuic4 lrf_renderer/main.ui | sed "s/import images_rc/from libprs500.gui2 import images_rc/" | \
sed "s/from library import/from libprs500.gui2.library import/"> lrf_renderer/main_ui.py
/bin/sh: Can't open pyuic4

pyuic4 does exist and my user can run it.

# pyuic4 --version
Python User Interface Compiler 4.3.1 for Qt version 4.3.0

kovidgoyal
10-03-2007, 05:15 PM
Replace pyuic4 in the Makefile with the full path to pyuic4

BrendenM
10-03-2007, 05:27 PM
Replace pyuic4 in the Makefile with the full path to pyuic4

Awesome, that fixed it. Ran setup and it installed correctly too, no more errors for bash-completion either.

Sorry about all the questions, not that familiar with python.

libprs500 is working and looks great.

MSWallack
10-04-2007, 03:39 PM
Curious to know if you've had a chance to look at (or had any luck with) the rtf2lrf error described in Ticket #220.

Also, is there a way to modify the formatting in an existing .lrf file? For example, once a file has been converted to .lrf, is there a way to adjust the font size or add a header with starting over from the original eBook file?

Thanks again for all your efforts.

kovidgoyal
10-04-2007, 08:22 PM
Oh I'm sorry somehow I forgot about that ticket. Probably because I missed the email notifying me about the file attachment, I'll look at it asap.

You can use the --lrs option to generate an LRS file (which is an XML file), edit it and then use an lrs2lrf compiler to generate an LRF file. Unfortunately I haven't got around to writing an lrs2lrf compiler for libprs500, too many higher priority tasks, but I think there is one floating around that uses DLLs from the connect software.

digiman
10-05-2007, 03:04 AM
Hi everyone,

I installed libprs500 for Feisty as described at
https://libprs500.kovidgoyal.net/wiki
I just copied and pasted the the whole thing to my terminal window

I get an exception when I try to add a book

restoreState
Detailed traceback:
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/main.py", line 261, in add_books
File "build/bdist.linux-i686/egg/libprs500/gui2/__init__.py", line 275, in choose_files
File "build/bdist.linux-i686/egg/libprs500/gui2/__init__.py", line 208, in __init__
AttributeError: restoreState

when I click on the library, I get the following

argument 0 of signal QListView.location_selected(PyQt_PyObject) has an invalid type
Detailed traceback:
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/widgets.py", line 81, in current_changed
TypeError: argument 0 of signal QListView.location_selected(PyQt_PyObject) has an invalid type

My python install is as follows

cat /usr/lib/python2.5/site-packages/easy-install.pth
import sys; sys.__plen = len(sys.path)
./TTFQuery-1.0.0-py2.5.egg
./libprs500-0.4.7-py2.5.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)

Am I missing some library or something? I am not a python programmer, so I have no idea how to debug. I am also a recent convert to Linux and my knowledge is still pretty green. Thanks in advance.

kovidgoyal
10-05-2007, 08:07 AM
You need to upgrade to the latest Qt, SIP, and PyQt versions
Qt >= 4.3.1, SIP >= 4.7.1 and PyQt >= 4.3.1

MSWallack
10-05-2007, 11:20 AM
I tried the UnRTF method that you suggested in your private e-mail (my reply bounced). I've updated the ticket with the results.

ddavtian
10-07-2007, 02:43 AM
Kovid, I always enjoy reading NYTimes and Newsweek, thank you for profiles. NYTimes downloads fast and size is around 1Mb. Newsweek is coming much slower, size is around 4-5 Mb and my reader opens and formats it very slowly (today's download has over 5000 pages).

Would you consider putting a limit on number of articles in each section? In today's "National News" and "World News" it gets articles all the way back from June. "National News" alone has 1,200+ pages. "World News" is around 800 pages, "Health" adds 500+ pages, "Entertaintment" is another 800 pages. It would be better to download only last 10-15 articles or last 2-3 weeks, in each section. You could hardcode a reasonable number or make it an option.

Do you have other favorite newspapers/magazines that may make to the libprs500? :)

Thanks,
David

kovidgoyal
10-07-2007, 02:46 AM
Sure adding a date based limit is probably a good idea. Open a ticket and I'll get it done. I was planning to add The Economist but there were some technical issues that I haven't had the time to sort out.

ddavtian
10-07-2007, 02:47 AM
Sure adding a date based limit is probably a good idea. Open a ticket and I'll get it done. I was planning to add The Economist but there were some technical issues that I haven't had the time to sort out.
Man, you're fast. I'll open a ticket now. Thanks in advance.

StDo
10-07-2007, 01:10 PM
Hi Kovid,

can't reach your site.

Got maybe a new bug here:

Tried to search a book called "Die Straßen". Error was displayed after typing the "ß"-character.

'ascii' codec can't encode character u'\xdf' in position 8: ordinal not in range(128)
Detailed traceback:
Traceback (most recent call last):
File "libprs500/gui2/library.pyo", line 689, in text_edited_slot
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 8: ordinal not in range(128)

Will open a ticket as soon as I can reach your site.

kovidgoyal
10-07-2007, 01:19 PM
Apache crashed. Bug fixed in svn.

StDo
10-07-2007, 01:25 PM
Apache crashed. Bug fixed in svn.

Damn, you are too fast. So I cannot create a new ticket... :)

MissLissa
10-08-2007, 05:09 PM
Ohmigosh! This is cool software - so much easier to use than Connect. I absolutely love it.
I mean the Libprs500 - haven't even figured out how to install Book Designer program.

kovidgoyal
10-08-2007, 05:17 PM
Thanks :-)

MissLissa
10-09-2007, 11:45 PM
:blink:
This may be a very basic question - but I know that it is a work in progress - so was wondering if there are updates I need to load or if it's automatic.

Thanks!

kovidgoyal
10-09-2007, 11:48 PM
There are periodic updates, about once a week. You just have to re-download and run the installer.

digiman
10-10-2007, 02:01 AM
Thanks kovidgoyal. I upgraded the Qt, PyQt, and SIP and it all worked out.

MissLissa
10-10-2007, 02:19 PM
There are periodic updates, about once a week. You just have to re-download and run the installer.

:D Thanks - I'll shedule it. I love the tool.

iacchi
10-12-2007, 07:23 PM
Kovid: I have some time and I want to try to solve the time/date problem on Debian Lenny. I've installed the latest release, but I can't find where easy_install put the installed books.py and library.py files. They're in the .egg file only even after installation?

kovidgoyal
10-12-2007, 07:32 PM
Yeah they're in the egg file. If you want to work on the source follow the development instructions at

https://libprs500.kovidgoyal.net/wiki/Development

iacchi
10-12-2007, 07:34 PM
Since you're online: it reports errors on books.py and library.py, but in the egg I can only find books.pyc and library.pyc, and they're binary!

kovidgoyal
10-12-2007, 07:36 PM
Yeah the egg only contains compile versions of the py files for size reasons. You have to check out from svn.

iacchi
10-12-2007, 07:48 PM
I get this error:


iacopo@hp:~/libprs500$ sudo python setup.py develop
Traceback (most recent call last):
File "setup.py", line 17, in ?
from libprs500 import __version__ as VERSION
File "src/libprs500/__init__.py", line 58
codec = 'cp1252' if iswindows else 'utf8'
^
SyntaxError: invalid syntax

kovidgoyal
10-12-2007, 07:49 PM
python2.5

iacchi
10-12-2007, 08:04 PM
Don't know if you remember the error I get, here it is:


time data did not match format: data=Fri, 24 Aug 2007 22:49:15 GMT fmt=%a, %d %b %Y %H:%M:%S %Z
Detailed traceback:
Traceback (most recent call last):
File "/home/iacopo/libprs500/src/libprs500/gui2/library.py", line 521, in sort
self.map.sort(cmp=fcmp, reverse=descending)
File "/home/iacopo/libprs500/src/libprs500/gui2/library.py", line 510, in datecmp
x = self.db[x].datetime
File "/home/iacopo/libprs500/src/libprs500/devices/prs500/books.py", line 46, in __get__
self.formatter else obj.elem.getAttribute(self.attr).strip()
File "/home/iacopo/libprs500/src/libprs500/devices/prs500/books.py", line 67, in
formatter=lambda x: time.strptime(x.strip(), "%a, %d %b %Y %H:%M:%S %Z"),
File "_strptime.py", line 330, in strptime
(data_string, format))
ValueError: time data did not match format: data=Fri, 24 Aug 2007 22:49:15 GMT fmt=%a, %d %b %Y %H:%M:%S %Z

May I know the source of that "Fri, 24 Aug 2007 22:49:15 GMT"? Where it takes the time from? And do you have an idea of why that date? (the date is my first install of libprs500 on my linuxbox)

kovidgoyal
10-12-2007, 08:12 PM
That date comes from one of the entries in main.xml on your device. THe really strange thing about that error (the reason I can't figure it out) is that it says that the fmt doesn't match the fmt string, but it does. You can check that here http://docs.python.org/lib/module-time.html

The only thing I can think of is some sort of string encoding issue.

kovidgoyal
10-12-2007, 08:13 PM
Ah I get it maybe your locale's abbreviated weekday name is not Fri.

iacchi
10-12-2007, 08:14 PM
In fact it's Ven, and Aug is Ago. What can we do? Or I do, at least? And why on Windows I don't have this problem? Even Windows is localized!

kovidgoyal
10-12-2007, 08:15 PM
Hmm I need to figure out how to get the time module to use the english locale in python

kovidgoyal
10-12-2007, 08:16 PM
try some of the functions from the locale module

kovidgoyal
10-12-2007, 08:18 PM
incidentally what is your locale?

iacchi
10-12-2007, 08:18 PM
italian

kovidgoyal
10-12-2007, 09:08 PM
I've committed a fix to svn, test it and let me know.

iacchi
10-13-2007, 05:51 AM
It works! You're fantastic! Let's go with 0.4.9 :P

JSWolf
10-13-2007, 10:19 PM
It works! You're fantastic! Let's go with 0.4.9 :P
Let's not and say we go with 0.4.10 instead.

gczobel
10-14-2007, 12:00 PM
I have two problems with the version 0.4.10
1) Unhandled exception
I have a book in the reader with the title "Señales de Lluvia".
(the third letter is a spanish letter)
double click on the book to change the title. Without change anything I click on another book. An exception is raised with text
'ascii' codec can't encode character u'\xf1' in position 2: ordinal not in range(128)
Detailed traceback:
Traceback (most recent call last):
File "libprs500\gui2\library.pyo", line 636, in setData
File "libprs500\devices\prs500\books.pyo", line 78, in fset
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 2: ordinal not in range(128)

2) Click on a book for ex: "1984" ( i see the number in bold in the left margin)
Click on the View button.
An error message with the text "No book selected" is showed

kovidgoyal
10-14-2007, 01:14 PM
both 1) and 2) will be fixed in next release.

beartard
10-15-2007, 03:04 AM
By the way, kovid, we're a few days away from the next release of Ubuntu. I've been running the Gutsy testing version for a while now and libprs500 is perfect so far. Latest updates give me a warning about pyqt being 4.3 where 4.3.1 is required. I still find no problems with the working of the software.

kovidgoyal
10-15-2007, 11:46 AM
Hmm that's strange. What happens if you try to convert two files simultaneously in the GUI. THat causes crashes for me with pyqt < 4.3.1

beartard
10-15-2007, 09:21 PM
That's a circumstance I hadn't encountered. I usually use the command line for converting books. I tried it and got the crash you were talking about. Individual conversions work fine, though.

kovidgoyal
10-15-2007, 09:29 PM
Yeah considering pyqt 4.3.1 is purely a bug fix release I'm surprised it din't make gutsy. Oh well.

iacchi
10-16-2007, 05:15 AM
Even in debain everything is fine for normal use. I think I'll no bother to convert one book per time. PyQt 4.3.1 doesn't exists in sid, too.

beartard
10-16-2007, 08:49 AM
It's a flurry of activity near the end of each release cycle. This is about the time I just sit back and don't even mess with the forums for a few weeks.

I'm sure it'll come as a backport within a few days.

kovidgoyal
10-16-2007, 12:04 PM
Good if it does. At any rate PyQt is trivial to install manually, so for people that have trouble, it should be installable.

beartard
10-16-2007, 09:26 PM
And here I thought I was being a good beta tester ;)

StDo
10-29-2007, 06:59 AM
For german readers:

Here is the first german RSS-newsfeed: FAZ.NET - the newsfeed of german Frankfurter Allgemeine Zeitung.

Download and extract attachment faznet.py.zip.
Use web2lrf --user-profile faznet.py to compile eBook from FAZ.NET RSS-newsfeed and copy the "FAZ NET [Mon 29 Oct 2007].lrf" to your Sony PRS.

Attention: Alpha version
!!!Bad layout!!! - next versions will try to compile a better layout. Anybody who wants to help, please post suggestions. :)

ddavtian
10-30-2007, 01:48 AM
Hi Kovid.
I hadn't used libprs500 last 3 weeks, was enjoying my iLiad :-) Today decided to go back to Sony, downloaded version 4.16, installed fine. But I was unable to fetch NYTimes or Newsweek. Before it usually took few minutes for each one, today I had to close the application after 25-30 minutes for each profile, without getting any output. It was using over 50% of CPU and >400Mb of memory. 30 minutes ago I started web2lrf for nytimes, it's still running, over 50% of cpu, >100Mb memory.

No changes on my computer during last 3 weeks (WinXP), no changes in my internet connection (8Mb download speed).

I just wanted to let you know.

Thanks, David

kovidgoyal
10-30-2007, 02:17 AM
Can you run it with the --verbose switch and tell me where it's hanging. It works for me.

ddavtian
10-30-2007, 02:33 PM
Kovid, it's must have been my home computer. I tried it this morning on another machine, no problem. Both NY Times and Newsweek were created in few minutes, without using too much of computer resources.

I'll try --verbose at home. What should I watch for? A log file? Screen message?

Thanks, David

kovidgoyal
10-30-2007, 02:39 PM
verbose will basically tell you what the program is doing, you need to find out where it's getting stuck (downloading, converting, output)

ddavtian
10-30-2007, 05:28 PM
I think I spoke too early. On my second machine I got returns in libprs500 for all three profiles, but sizes were 0Mb. An hour ago I installed it on a new laptop, had to stop it after 30 minutes (running NY Times), it was taking over 500Mb of memory.

All three machines are running WinXP, all using 0.4.16.

I'll use --verbose later today at home.

kovidgoyal
10-30-2007, 05:42 PM
May be a windows specific bug.

MissLissa
10-30-2007, 08:11 PM
Wow-wee! Downloaded the most recent version and I love it. Using it on XP SP2 for my Sony PRS500. I love how I can now edit in-line. The install went very smooth (and looks cool, too).

However - I don't see the TAG field for my card. It will let me enter tags using the Edit Meta Data button (singly or in bulk).

Is there anyway we can drag and drop from reader to card and vice versa? Just a hope.

Thanks, man, do you great work.

MissLissa
10-30-2007, 08:23 PM
:huh:

I just added a lot of books to the library, edited tags, updated names and got the following error when I tried to moved them to the card. (LIBPRS500 0.4.16) I am using Windows XP SP 2

Here's the log dump (please if this is not how to do this, tell me, I'm a quick learner).

Error in job: Copy books from device to disk
Could not read 4096 bytes on the bulk bus. Error code: -116
Traceback (most recent call last):
File "libprs500\gui2\jobs.pyo", line 79, in run
File "libprs500\gui2\device.pyo", line 130, in save_books
File "libprs500\devices\prs500\driver.pyo", line 169, in run_session
File "libprs500\devices\prs500\driver.pyo", line 490, in get_file
File "libprs500\devices\prs500\driver.pyo", line 407, in _bulk_read
File "libprs500\devices\prs500\driver.pyo", line 394, in bulk_read_packet
File "libprs500\devices\libusb.pyo", line 258, in bulk_read
Error: Could not read 4096 bytes on the bulk bus. Error code: -116

Traceback (most recent call last):
File "libprs500\gui2\device.pyo", line 46, in run
File "libprs500\devices\prs505\driver.pyo", line 114, in is_connected
File "wmi.pyo", line 466, in __getattr__
File "wmi.pyo", line 1124, in connect
File "wmi.pyo", line 188, in handle_com_error
x_wmi: -0x7ffbeffe - OLE error 0x80041002

Traceback (most recent call last):
File "main.py", line 328, in books_uploaded
File "libprs500\gui2\device.pyo", line 110, in add_books_to_metadata
File "libprs500\devices\prs500\driver.pyo", line 892, in add_books_to_metadata
File "libprs500\devices\prs500\books.pyo", line 249, in add_book
AttributeError: 'NoneType' object has no attribute 'createElement'

Traceback (most recent call last):
File "main.py", line 328, in books_uploaded
File "libprs500\gui2\device.pyo", line 110, in add_books_to_metadata
File "libprs500\devices\prs500\driver.pyo", line 892, in add_books_to_metadata
File "libprs500\devices\prs500\books.pyo", line 249, in add_book
AttributeError: 'NoneType' object has no attribute 'createElement'

Traceback (most recent call last):
File "main.py", line 328, in books_uploaded
File "libprs500\gui2\device.pyo", line 110, in add_books_to_metadata
File "libprs500\devices\prs500\driver.pyo", line 892, in add_books_to_metadata
File "libprs500\devices\prs500\books.pyo", line 249, in add_book
AttributeError: 'NoneType' object has no attribute 'createElement'

ddavtian
10-30-2007, 08:31 PM
Wow-wee! Downloaded the most recent version and I love it. Using it on XP SP2 for my Sony PRS500.

MissLissa, can you get the news? I had a problem since yesterday on three different XP SP2 machines.

Thanks, David

kovidgoyal
10-30-2007, 10:37 PM
There isn't an easy way to move from card to main memory or vice versa. The shortest way is to save card to disk (if i remember right it will save in a single folder) The open the main memory view and click add books.

That error looks like it was a problem talking to the device. Try shutting down the GUI and reconnecting the device.

ddavtian
10-31-2007, 06:58 PM
Kovid, I ran web2lrf for newsweek with verbose.
I let it run for an hour, then stopped it.

This was being repeated all the time:
[INFO] convert_from.pyo:345: Converting to BBeB...
[INFO] convert_from.pyo:342: Processing index.html
[INFO] convert_from.pyo:294: Parsing HTML...
[INFO] convert_from.pyo:329: Written preprocessed HTML to c:\docume~1\davidd~1\l
ocals~1\temp\html2lrf-verbose.html
[INFO] convert_from.pyo:345: Converting to BBeB...
[INFO] convert_from.pyo:342: Processing index.html
[INFO] convert_from.pyo:294: Parsing HTML...
[INFO] convert_from.pyo:329: Written preprocessed HTML to c:\docume~1\davidd~1\l
ocals~1\temp\html2lrf-verbose.html


Last few lines from libFNP_events.log:
13:57:16 31-10-2007 [P:648],[T:4292] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:09:12 31-10-2007 [P:5220],[T:5180] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:09:18 31-10-2007 [P:568],[T:824] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:09:50 31-10-2007 [P:5220],[T:5180] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:09:52 31-10-2007 [P:568],[T:824] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:11:50 31-10-2007 [P:5444],[T:5232] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:11:51 31-10-2007 [P:5444],[T:5232] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:12:02 31-10-2007 [P:1052],[T:5372] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:12:03 31-10-2007 [P:1052],[T:5372] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:50:33 31-10-2007 [P:2796],[T:5072] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:50:34 31-10-2007 [P:2796],[T:5072] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:51:20 31-10-2007 [P:4540],[T:5160] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487
14:51:22 31-10-2007 [P:4540],[T:5160] Exception: 64, Module: 100000, Location: 1, Internal: 2147942487

"html2lrf-verbose.html" was containing the latest processed article.

I don't know if there is enough information here to see what was happening.

kovidgoyal
11-01-2007, 01:22 PM
It seems to be simply running really slow on your machines. I'm trying it under windows to see if I can replicate this behavior.

EDIT: Found a bug in the way paths are handled on windows. Will be fixed in the next release. Thanks for reporting this bug.

htaylor
11-04-2007, 06:19 AM
Minor typo, when using fetch metadata from server, the place to get the access key should be ISBNdb.com, instead of isndb.com.

great program. many thanks

kovidgoyal
11-04-2007, 01:28 PM
Thanks, fixed.

Mitchll
11-06-2007, 06:39 PM
Reader not showing on GUI. Received this error message:

Could not read 32 bytes on the control bus. Read: -5 bytes.
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 187, in device_detected
File "libprs500\gui2\device.pyo", line 65, in __init__
File "libprs500\devices\prs500\driver.pyo", line 267, in open
File "libprs500\devices\prs500\driver.pyo", line 329, in send_validated_command
File "libprs500\devices\prs500\driver.pyo", line 313, in _send_command
File "libprs500\devices\libusb.pyo", line 232, in control_msg
Error: Could not read 32 bytes on the control bus. Read: -5 bytes.

kovidgoyal
11-06-2007, 08:33 PM
Looks like a temporary error communicating over the USB port. Reconnecting the device and/or rebooting should take care of it.

Mitchll
11-07-2007, 08:03 AM
Looks like a temporary error communicating over the USB port. Reconnecting the device and/or rebooting should take care of it.

Appears to be so, as it works fine now. Thanks again for the great work!

MissLissa
11-09-2007, 10:18 AM
That error looks like it was a problem talking to the device. Try shutting down the GUI and reconnecting the device.

Yes - that fixed it. HOWEVER, why aren't the tags showing up on books I store to a memory card?

I add the books to the library. I fuss about with the details. There isn't an inline editing for TAGs (unless I just don't know how to add it), so I use the handy menu bar icon. I add my tags. I move the books to the card. They get updated - except for the Tags. Why?

Thanks so much for you work on this project!

MissLissa
11-09-2007, 10:44 AM
MissLissa, can you get the news? I had a problem since yesterday on three different XP SP2 machines.

Thanks, David

No :(

Just tried it today, seems to hang. It says it's working, but never seems to yield any results.

kovidgoyal
11-09-2007, 11:54 AM
That's because the PRS500 doesn't support tags for files on the card. Nothing I can do about that.

Mitchll
11-09-2007, 07:00 PM
It occurs to me that backing up the library database file would be an excellent idea...which file is is it and in which directory would I find it?

Thanks

kovidgoyal
11-09-2007, 07:02 PM
library1.db somewhere in your user directories (depends on windows version) just do a search.

MissLissa
11-09-2007, 09:17 PM
That's because the PRS500 doesn't support tags for files on the card. Nothing I can do about that.

:smack:Well - that explains it then!

Thanks!

kovidgoyal
11-09-2007, 10:07 PM
Kovid, I ran web2lrf for newsweek with verbose.
I let it run for an hour, then stopped it.

.

Try 0.4.18

Mitchll
11-10-2007, 09:47 AM
library1.db somewhere in your user directories (depends on windows version) just do a search.

Is there is size limitation to the library? Practical or real?

kovidgoyal
11-10-2007, 01:26 PM
Not that I'm aware of. The database file is indexed, so there's no reason its size cannot grow indefinitely.

BobWhite
11-13-2007, 08:38 PM
I installed libprs500 and it seems to be working fine as far as moving books back and forth. One question, though, since installing libprs500 requires removing the Sony driver. Prior to putting libprs500 on my system, all I had to do to set the clock was connect it to my PC. Now, it still shows daylight saving time. Is there a way to set the clock through libprs500?

I know about the Help About clock setting feature, but that seems to either be off, on, or am/pm settings only. I haven't figured out if there is a combination of buttons needed to set the actual clock time.

I fired up the Connect software today to try and set the clock. Without the driver, it didn't recognize the reader as being connected, so the time didn't change.

In the process of doing this, it noted there was a new version of the Connect software 2.xxxxx. Is there any reason to download this? I couldn't find anything on the forum here regarding the new version.

Thanks,

Bob

kovidgoyal
11-13-2007, 10:19 PM
libprs500 does set the clock on your reader, if you start up the software with the reader connected. However, there is a bug in python that prevents it from handling DST changes correctly. I've implemented a possible workaround that will be in the next version. Try it and see.

THe version 2.0 of the connect software mainly adds support for the 505.

BobWhite
11-13-2007, 11:16 PM
I'll be looking forward to the next version!

Thanks for the hard work!!

Bob

BobWhite
11-16-2007, 09:28 PM
I received the following error when trying to upload a book to the reader:

'BookList' object has no attribute 'root_element'
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 330, in books_uploaded
File "libprs500\gui2\device.pyo", line 115, in add_books_to_metadata
File "libprs500\devices\prs500\driver.pyo", line 891, in add_books_to_metadata
File "libprs500\devices\prs500\books.pyo", line 267, in add_book
File "libprs500\devices\prs500\books.pyo", line 259, in book_by_path
AttributeError: 'BookList' object has no attribute 'root_element'

kovidgoyal
11-16-2007, 10:37 PM
oops typo i'm re-releasing 0.4.22 with a fix. Try downloading again in half an hour.

BobWhite
11-17-2007, 12:07 PM
They'll get you every time.

That seemed to fix the upload problem. Apparently, while trying to upload a file to the reader last night, it did manage to transfer something because there were several different (unreadable) versions of the book out there. I was able to delete all but one, and that one consistently gives me the following message:

PathError: /Data/media/libprs500/libprs500_80.rtf does not exist on device
Failed to perform job: Remove books from device
Further device related error messages will not be shown while this message is visible.
Detailed traceback:
Traceback (most recent call last):
File "libprs500\gui2\jobs.pyo", line 79, in run
File "libprs500\gui2\device.pyo", line 121, in delete_books
File "libprs500\devices\prs500\driver.pyo", line 168, in run_session
File "libprs500\devices\prs500\driver.pyo", line 897, in delete_books
File "libprs500\devices\prs500\driver.pyo", line 168, in run_session
File "libprs500\devices\prs500\driver.pyo", line 738, in del_file
File "libprs500\devices\prs500\driver.pyo", line 168, in run_session
File "libprs500\devices\prs500\driver.pyo", line 439, in path_properties
PathError: /Data/media/libprs500/libprs500_80.rtf does not exist on device

The .rtf I'm trying to delete did NOT have that name on my laptop. Is it possible somehow to delete that file? The name on the PC was something like "HP5 - Harry Potter and the Order of the Phoenix.rtf", and is what shows up in libprs500.

Thanks!!

Bob

kovidgoyal
11-17-2007, 01:57 PM
Hmm that's strange. Just unplugging the reader and re-connecting it should remove entries that point to files that dont exist.

BobWhite
11-17-2007, 09:13 PM
It seems okay now. I hadn't unplugged and replugged it back in.

Thanks!

Bob

Irrawaddy
11-18-2007, 01:47 PM
oops typo i'm re-releasing 0.4.22 with a fix. Try downloading again in half an hour.

Kovidgoyal -

I'm receiving the same error and I'm using 0.4.22 on Ubuntu Gutsy. I'm fairly certain I have all of the pre-reqs installed properly (pyQt, python 2.5.1, etc)

Though then if I close libprs500, and unplug the reader, the books are present on the reader - though some don't have the covers that I added through the GUI (awesome feature btw!)

Error Message:
'BookList' object has no attribute 'root_element'
Detailed traceback:
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/main.py", line 330, in books_uploaded
File "build/bdist.linux-i686/egg/libprs500/gui2/device.py", line 115, in add_books_to_metadata
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 891, in add_books_to_metadata
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/books.py", line 267, in add_book
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/books.py", line 259, in book_by_path
AttributeError: 'BookList' object has no attribute 'root_element'

kovidgoyal
11-18-2007, 02:29 PM
On linux you'll have to wait till 0.4.23 for the fix.

FixB
11-22-2007, 02:07 AM
I'm now using libprs500 to manage my ebooks collection (with tags and all :)). I just wanted to know where the information is stored, so that I could backup it (you never know what can happen, and it takes a lot of time to input everything). The best would be to be able to export this data in a "classic" format (csv, xml, whatever).

kovidgoyal
11-22-2007, 01:55 PM
It's stored in the database file library1.db, whoose location depends on OS. Just search for it. At the moment you cannot export metadata, but its easy to implement and if you open a bug report, I'll get around to it

FixB
11-22-2007, 01:59 PM
Thanks very much (again !) kovidgoyal !!

Mitchll
12-13-2007, 07:26 PM
Kovid
Is it possible to merge two databases? Also, after export book file to disk, can I import full fie, ie lrf plus source file plus data into one "slot" in existing database?

Mitch

kovidgoyal
12-13-2007, 09:29 PM
No merging is not possible. A full import feature is on my TODO list. It will allow you to export you database and then re-import it with all metadata.

Mitchll
12-13-2007, 10:02 PM
Thanks, something to look forward to.
Mitch

sea2stars
12-15-2007, 12:49 PM
Kovid,

I just noticed with the current Windows release that we can now store the database where we choose. However, would it be possible to store the database on the reader itself, using a memory stick if available? If not, I guess I could store it on my thumb drive on my keys, along with the installer, for when I travel and would like to update my library/Reader.

Also, under the configuration, could there be support to show which headers (Author, Title, etc.) are visible? And.. could a "Book Finished", or simply a "Read" tag be added? Of course, if the first line of the "Comments" section was visible on the main screen, that'd work too.

All in all, I'm very happy at how the program is maturing!

kovidgoyal
12-15-2007, 02:23 PM
The problem with storing the database on a removable drive is that windows may not give it the same drive letter on a different computer. Indeed, the drive letter may not exist at all, in which case libprs500 may not start. You would have to copy the database from the removable disk to the harddisk. I suppose I could add an "import database" option withing the GUI that will make this easy.

Customizing the displayed columns, is on my TODO list, but it has a rather low priority.

Both the tags and the comments are displayed in the status bar when you click on a book. You can also search on both tags and comments.

sea2stars
12-15-2007, 04:06 PM
Bummer. But it's no difficulty for me to just copy a backup of the database to my thumb drive and then copy it to another system.

Heh. Right after I posted I checked out the ticket listing on the libprs500 site; should've done that in the first place.

*nod* I noticed that they are displayed when you click the book, but when you're trying to remember which books/short stories you've read out of a couple hundred entries, it would be a benefit to have some of that info available without clicking through every entry. I agree that it's a low priority though.

Mitchll
12-15-2007, 04:39 PM
I'm getting the following conversion error message (same for several books):

AttributeError: GetCharMap instance has no attribute '_GetCharMap__bug_handler'
Failed to perform job: Convert book:Stone angel
Detailed traceback:
Traceback (most recent call last):
File "libprs500\gui2\jobs.pyo", line 97, in run
File "libprs500\ebooks\lrf\any\convert_from.pyo", line 140, in main
File "libprs500\ebooks\lrf\any\convert_from.pyo", line 117, in process_file
File "libprs500\ebooks\lrf\rtf\convert_from.pyo", line 85, in process_file
File "libprs500\ebooks\lrf\rtf\convert_from.pyo", line 178, in generate_html2
File "libprs500\ebooks\lrf\rtf\convert_from.pyo", line 169, in generate_xml
File "rtf2xml\ParseRtf.pyo", line 399, in parse_rtf
File "rtf2xml\hex_2_utf8.pyo", line 778, in convert_hex_2_utf8
File "rtf2xml\hex_2_utf8.pyo", line 198, in __initiate_values
File "rtf2xml\get_char_map.pyo", line 68, in get_char_map
AttributeError: GetCharMap instance has no attribute '_GetCharMap__bug_handler'
Log:
[INFO] convert_from.pyo:177: Converting RTF to XML...



Mitch:thanks:

kovidgoyal
12-15-2007, 04:45 PM
Send me one of these RTF files

ctennenh
12-17-2007, 04:09 PM
Kovid, I've noticed that most or all (I can't recall if it's ever worked) lrf's created with Docudesk's DeskUnPDF will not allow addition into the library, nor directly to the reader. They are recognized by the Connect software under XP, however. In LibPRS500 in OS X (10.4) I get an error and have to force quit. If you need me to I'll grab a screenshot of the error next time.

kovidgoyal
12-17-2007, 09:16 PM
Even better attach a sample LRF to a ticket.

tsgreer
12-24-2007, 06:46 PM
Kovid, have you had any luck/time at getting around to a version of html2prc? I love the stuff you did for my Sony and my Kindle could use some Kovid TLC as well. :)

kovidgoyal
12-24-2007, 08:20 PM
Not yet, (un)fortunately I just made a couple of breakthroughs in my research, so libprs is on the backburner for a bit :-)

tsgreer
12-24-2007, 09:04 PM
Not yet, (un)fortunately I just made a couple of breakthroughs in my research, so libprs is on the backburner for a bit :-)

Wait, you have a real life? What the hell?

You're not allowed to have a real life! Ok, ok, maybe I am just jealous because I have no real life. :)

kovidgoyal
12-24-2007, 09:19 PM
Not too worry, it'll go away soon

FizzyWater
01-06-2008, 07:16 PM
Any chance you could add "justification" to the settings that can be tweaked. I personally don't care for full justification, and I see that's the default.

Thanks.

kovidgoyal
01-07-2008, 03:27 AM
That's controlled by the reader software not the LRF file itself.

Mitchll
01-09-2008, 05:23 PM
Kovid,
Certainly no big deal, but the series book number on the gui is in roman numerals; when you get into a major series, the number requires a little thought to decode. As my brain is getting old fast, can this be provided in arabic numerals as an alternative.

Mitch:thanks:

kovidgoyal
01-09-2008, 08:07 PM
Exercise is good for the brain ;) But open a ticket and I'll add a config option.

Carpecerevisi
01-11-2008, 09:21 AM
Hey there kovidgoyal. A quick request if you manage to find the time...folks with slow dialup (and I mean slow...2-10 seconds latency at times) like myself may have some trouble fetching metadata from Isbndb, as it just times out every time.

If i understand the code I saw (which i probably don't), the default is 3 or 5 seconds to timeout. Is there any possibility of maybe a High Latency mode (checkbox) that would change that timeout to 20 seconds or so?

Also, I already opened a ticket on this before I saw this thread, so I apologize for that. Thanks for your time and keep up the great work.

kovidgoyal
01-11-2008, 12:08 PM
Sure I can add a config option to do that. And I prefer tickets to forum posts :)

KaiGoth
01-11-2008, 08:00 PM
Hey, haven't been here in a while, but love the new stuff like the news fetcher and isbndb connection. Just wanted to say thanks!

Although, it is getting kind of slow with 4000+ books in the library. :)

kovidgoyal
01-11-2008, 08:03 PM
What in particular is getting slow?

KaiGoth
01-11-2008, 08:08 PM
Wow, do you live here?!?! ;)

After making any changes to the metadata in a book (or 5 at a time), it hangs for about 5-10 seconds. No biggie, figure that's what I have to deal with when keeping such a large library. Still a HELL of a lot faster and feature rich than the Sony app!

kovidgoyal
01-11-2008, 08:11 PM
Email notification :) Yeah that would be slow database writes. The database design is optimized for reads on the theory that reads happen a lot more frequently than writes.

KaiGoth
01-11-2008, 08:20 PM
That makes sense, and is usually fine. I'm just in the middle of some massive batch conversions and importing/editing them can't be scripted like the conversions!

Since you're here, has Sony done anything to allow collections on memory cards yet? About the only thing left (thanks to libprs500) I'd like to see.

kovidgoyal
01-11-2008, 08:24 PM
only on the the 505. 500 still has no collections on cards.

KaiGoth
01-11-2008, 08:27 PM
Dang, guess I have to upgrade this year.

KaiGoth
01-12-2008, 12:04 AM
Hey, since we're on the subject of database performance, what are the chances of being able to manage multiple databases with libprs500?

Would be nice to be able to split my current database into 2 or 3 of 2000 books or less (about where I started noticing a slow down). That or some sort of "tag tree" browsing functionality. The search feature is nice, but I often like to browse for something to read.

kovidgoyal
01-12-2008, 12:16 AM
As for multiple databases, the chances are abysmal unless youre willing to write the code ;)

What do you mean by a tag tree?

macr0t0r
01-15-2008, 01:22 AM
Finally took the time to install version 0.4.33 of libprs500 on my iMac. Man, what an improvement over the 0.3.x days! I find it to be an excellent tool for organizing my eBooks due to the search filter and the ability to store multiple formats of each book. The USB interface to the Sony Reader is VERY nice, so I'm now putting my books into the Main memory so that I can do collections. It also does a nearly PERFECT job of converting my purchased (and DRM-stripped) MS Lit files.

Not everything is perfect, though (of course). There are many issues with conversion:
1. Not a good tool for converting Plain Text files to LRF. It removes any indentations and tends to gobble up most carriage returns. I've fiddled with the settings, but it still tends to create one giant, flat paragraph. I find it's better to convert Plain Text to RTF with the OS X "textutil" and then convert from there.

2. Very crash-prone when converting files. It's best to just convert one file at a time.

3. It either needs a hotkey to display MetaData, or there needs to be an option to have ALL MetaData shown in the column display. Numbering books in a collection is a pain. (Select file, edit medata, type book number, click save, select next file, etc...)

4. Available formats should be in Column display so I can see at a glance what I need to convert.


But, for organizing and sending eBooks, this thing is far superior to Sony's interface. Thanks for all your hard work on this!

- Jim

kovidgoyal
01-15-2008, 01:39 AM
1. The plain text conversion is really meant to define a plain text ebook format using lightweight markup (specifically markdown). So that you can create plain txt files with links and headers and formatting and lists and even tables. It is not meant to "do the right thing" with every text file you throw at it. That's not going to change as I prefer to run dedicated tools on a txt file from a given source (e.g. gutenmark) and then convert the HTML.

2. Are the multifile conversion still causing crashes? I though I'd squashed that bug a while ago.

3. Making the displayed columns customizable is on my TODO list

4. In version 0.3.34 you'll be able to search for the term !lrf to get a list of books that dont have an LRF format (this is not a 100% safe since the search will be over all metadata so some book that has the string "lrf" in its metadata wont show up, but this is the best you'll get until i implement an advanced search dialog.

Shadowcat
02-05-2008, 03:32 PM
I just got my Sony 505 reader and was very happy to find the libprs500 program. So kovidgoyal, excellent job!!

Now on to the meat of the post:

- On the multiple conversion crashes, I've ran across this and I'm pretty sure it is system specific. i.e. Something on that specific PC is causing the crash. I've run the libprs500 program on my desktop and my laptop, where the desktop exhibits the problem but the laptop has been completely crash free.

Library request: I know there have been a few other posts requesting the importing of save library feature, and I'd like to add a slight twist to that. Is there any way to add the feature of importing the metadata from a previously saved (saved by the libprs500 to disk) ebook to the current library? This would be a big help in a few areas:
- The "series" or "collection" information could be kept with the save disk file. This would make it much easier if you have multiple readers and want to have customized libraries on each without having to redue all of the work creating the series.
- The search feature is nice, but when you have large collections and just want to browse for a book it's a pain to walk through the whole collection. Instead if all of your books are in a nice directory structure (which the libprs500 does right now when you save to disk), it's easy to browse and grab the ones you want with the libprs500 and then upload them into the ebook. (you can do this right now, but since the metadata isn't also loaded if you add say 6 books from a series there is no "collection" info being passed to the Sony Reader)
- Also if you want to share books that you have spent a lot of time customizing the metadata, the only way to do this is to share the libprs500 database. This isn't really the optimal solution since each persons reading preferences are different. Do I really want to read my girlfriends romance novels? <grin>)

Once again, excellent program and much better than the sony software. Keep up the great work!

kovidgoyal
02-05-2008, 06:35 PM
Do the desktop and laptop have the same OS?

Right now the save to disk feature saves the metadata as an OPF file, in the same directory as the ebook files. When I implement recursive ebook import, it will import the metadata back into the database as well.

The equivalent of browsing through a folder structure in libprs500 is to use the search, so for example if you want to browse books by Asimov you type author:Asimov in the search field, then if you want to browse books tagged with "foundation" you type "author:Asimov tag:foundation" and so on...I find this a much more powerful browsing system than using folders. After all folders are basically hierarchical tags. But general tags, like libprs500 has, can mimic the functionality of hierarchical tags and provided more features as well. For instance, if you want to browse through books by two different authors, say Dostoevsky and Russell (don't ask me why those two), there's no convenient way to do it using folders, but with a search interface you just type [author:Dostoevskt author:Russell] and then you can sort the list on title or date or rating and browse through your collection easily.

EDIT: I hope your girlfriend isn't reading this ;-)

Shadowcat
02-06-2008, 02:47 PM
Hi Kovidgoyal!

Yes, both the desktop and the laptop are running Windows XP SP2 with all of the latest Windows patches. So the only two areas that are different are the software packages I've got installed (the PC has many more pieces of software installed), and the specific hardware drivers. I'll see if I can get a good error message to generate on the desktop, and if so I'll do a screen capture and post it.

I'm happy to hear that you've already got the recursive ebook import on your feature request list. For now I'll just leave the opc files in the saved file folders and look forward to this feature sometime in the future.

I use the search function now and it works quite well, but not really designed for random browsing. Of course if I have the files saved to disk I could always browse through there (which means i could organize them any way I wanted), and then just do a search in the libprs500 and load it to the ebook.

And no, my girlfriend isn't reading this. But of course I had to go and tell her my comments about the romance novels, which elicited a smack in the arm <grin>.

lovebeta
02-18-2008, 06:35 PM
Hi Kovidgoyal,

Thanks for the great software. I have a PRS-500. If I understand correctly, I cannot use libprs500 together with ebook library due to the driver issue, right. Now my question is, can I use libprs500 on one computer and use ebook library on another computer? I really like your software, but I have to use the sony one to purchase books.

Thanks!

kovidgoyal
02-18-2008, 06:45 PM
No you shouldn't use both to manage the books on your reader. I would suggest you simply save the books/news in the libprs500 GUI to a folder that you then set as the auto-sync folder in the Connect software. That way, you can use the Connect software to buy books and using the libprs500 GUI is almost as convenient as if you were using it to transfer books.

Chris Rastyk
02-24-2008, 10:48 PM
I had seen this on windows, probably about six months ago. I haven't used the sony reader for awhile, since the windows tools were crashing on me, it was taking too long to update the reader with news articles because of it. Today, I checked out the linux release of libprs500 (using ubuntu gutsy 7.10). This is a well-done application, I was able to upload a number of technical documents and this is very, very handy!

Xenophon
03-08-2008, 08:56 PM
I'm getting lots of errors like this one:

NoneType: Could not run job: any2lrf ([u'libprs500', u'--minimum-indent', u'0.0', u'--base-font-size', u'9.0', u'--author-sort', u'Saberhagen, Fred', u'--author', u'Fred Saberhagen', u'--force-page-break-before-attr', u'$,,$', u'--wordspace', u'2.5', u'--chapter-regex', u'chapter|book|appendix', u'--right-margin', u'10', u'--title', u'Rogue Berserker', u'--page-break-before-tag', u'h[12]', u'--left-margin', u'10', u'--top-margin', u'5', u'--publisher', u'Baen Books', u'--force-page-break-before-tag', u'$', u'--headerformat', u'%t by %a', u'--bottom-margin', u'0', u'--baen', u'--profile', u'prs500', u'--cover', u'/var/folders/vi/visJUvLg2RaGnE+8ZKwa9+++59k/-Tmp-/libprs500_0.4.42_Ivm7PS.jpeg', '-o', '/var/folders/vi/visJUvLg2RaGnE+8ZKwa9+++59k/-Tmp-/libprs500_0.4.42_ib-3m1.lrf', u'/var/folders/vi/visJUvLg2RaGnE+8ZKwa9+++59k/-Tmp-/libprs500_0.4.42_FtRHGI.zip', '--verbose'],)
Failed to perform job: Convert book:Rogue Berserker
Detailed traceback:
Traceback (most recent call last):
File "libprs500/gui2/jobs.pyo", line 105, in run
File "libprs500/parallel.pyo", line 123, in run
RuntimeError: Could not run job: any2lrf ([u'libprs500', u'--minimum-indent', u'0.0', u'--base-font-size', u'9.0', u'--author-sort', u'Saberhagen, Fred', u'--author', u'Fred Saberhagen', u'--force-page-break-before-attr', u'$,,$', u'--wordspace', u'2.5', u'--chapter-regex', u'chapter|book|appendix', u'--right-margin', u'10', u'--title', u'Rogue Berserker', u'--page-break-before-tag', u'h[12]', u'--left-margin', u'10', u'--top-margin', u'5', u'--publisher', u'Baen Books', u'--force-page-break-before-tag', u'$', u'--headerformat', u'%t by %a', u'--bottom-margin', u'0', u'--baen', u'--profile', u'prs500', u'--cover', u'/var/folders/vi/visJUvLg2RaGnE+8ZKwa9+++59k/-Tmp-/libprs500_0.4.42_Ivm7PS.jpeg', '-o', '/var/folders/vi/visJUvLg2RaGnE+8ZKwa9+++59k/-Tmp-/libprs500_0.4.42_ib-3m1.lrf', u'/var/folders/vi/visJUvLg2RaGnE+8ZKwa9+++59k/-Tmp-/libprs500_0.4.42_FtRHGI.zip', '--verbose'],)
Log:


Using libprs500 v0.4.42. Any hints?

Xenophon

Xenophon
03-08-2008, 09:17 PM
And, even weirder, repeated attempts to convert the same book sometimes lead to success! Perhaps a more detailed error message might help with diagnosis.

I have notice, by the way, that there are a number of points during the conversion process where I see neither CPU usage nor disk I/O. It seems odd to me that the whole process sometimes sits there for a minute (or two, or five) seeming to do absolutely nothing.

All this on a Mac Pro (early 2008) running Mac OS X 10.5.2, with the latest libprs500.

Xenophon

kovidgoyal
03-08-2008, 10:43 PM
Hmm sounds like OS X doesn't like the new child process architecture. I've uploaded a new 0.4.42 dmg can you try with that, the error message may be more helpful

iacchi
03-09-2008, 12:23 PM
Kovid, I get this error giving libprs500_postinstall:


Iacopo:/home/iacopo# libprs500_postinstall
Trying to setup udev rules...
/bin/sh: /etc/init.d/hald: No such file or directory
Restarting Hardware abstraction layer: hald.
Setting up bash completion... done
Setting up desktop integration...
Installing MAN pages...
Traceback (most recent call last):
File "/usr/bin/libprs500_postinstall", line 8, in <module>
load_entry_point('libprs500==0.4.42', 'console_scripts', 'libprs500_postinstall')()
File "build/bdist.linux-i686/egg/libprs500/linux.py", line 348, in post_install
File "build/bdist.linux-i686/egg/libprs500/linux.py", line 324, in install_man_pages
File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
errread, errwrite)
File "/usr/lib/python2.5/subprocess.py", line 1147, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

kovidgoyal
03-09-2008, 03:00 PM
You need to install the program help2man

BobWhite
03-30-2008, 05:47 PM
Kovid,

What is done with the series and book number within series information? Is that information passed over to the PRS-500?

I read a lot of books in various series. When using libprs500 to look up the book information and cover, if I have the book within series info in the title, the lookup can't find it. A lot of times, that information is already in the filename, so to look up the cover, I have to take it out, then put it back. With 300+ books on my reader, it's hard to keep track of the order in which to read some of them!

Would it be possible to have that info optionally prepended to the title when the book is moved to the Sony?

For example, take David Weber's Starfire series: (1) Insurrection, (2) Crusade, (3) In Death Ground, and so forth (there are 5 total).

I'd like to specify the following metadata in the library: title - "Insurrection", author - "David Weber", series - "Starfire", book - "1" for the first book, and so forth for the rest of them.

What I'd like to see on the PRS-500 would be title: "Starfire 01 - Insurrection", author - "David Weber". The second book would have the title "Starfire 02 - Crusade", the third book "Starfire 03 - In Death Ground", and so forth. This would keep books in a series grouped together without having to use a collection (which would be limited to what you could cram into main memory).

Thanks,

Bob

kovidgoyal
03-30-2008, 06:11 PM
That information is passed to the 500 as an ordered collection if the books are in the main memory. On the 505 it works for all books.

I'm not inclined to implement this, as the internal modular architecture of libprs500 means that the module that passes metadata to the device isn't aware of the type of device. Since this feature is really only useful on the 500 for books on SD cards, it seems that re-architecting libprs500 is too much work for suh a limited use case :)

BobWhite
03-30-2008, 08:35 PM
That information is passed to the 500 as an ordered collection if the books are in the main memory. On the 505 it works for all books.

I'm not inclined to implement this, as the internal modular architecture of libprs500 means that the module that passes metadata to the device isn't aware of the type of device. Since this feature is really only useful on the 500 for books on SD cards, it seems that re-architecting libprs500 is too much work for suh a limited use case :)

Sounds like my solution will be to move non-series books to the SD card and keep series in main memory. Someday....

Thanks,

Bob

randcoop
06-11-2008, 05:09 AM
Running the postinstall, I get the error that help2man can't get --help from calibre-fontconfig. It then says that "unable to create MAN page for calibre-fontconfig"

This seems to be a serious problem. While the command line prs500 info sees my Ereader, nothing else seems possible. I can't get the Calibre GUI to run. Running things from the command line get far, but ultimately crash with similar errors about fontconfig (for example, I ran web2lrf nytimes and it downloaded for a long time, but then at the end, it crashed).

I'm using Kubuntu 8.04.

Can anyone tell me what to do to fix the problem? help2man is installed.

kovidgoyal
06-11-2008, 05:11 AM
What error exactly does the GUI crash with

randcoop
06-11-2008, 08:02 AM
File "/usr/bin/calibre", line 8, in <module> load_entry_point('calibre==0.4.69', 'gui_scripts, 'calibre')()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 277, in load_entry point return get_distribution(dist).load_entry_point(group, name)

It goes on from there citing other lines.

The final line is:

OSError: libfontconfig.so: cannot open shared object file: No such file or directory

kovidgoyal
06-11-2008, 08:27 AM
sudo ln -s /usr/lib/libfontconfig.so.1 /usr/lib/libfontconfig.so

randcoop
06-11-2008, 09:44 AM
Thank you. Works perfectly now.

iacchi
06-20-2008, 12:58 PM
Maybe not a GUI problem, but:


iacopo@Iacopo:~/Desktop$ pdfreflow book.pdf
Converting PDF to XML
Traceback (most recent call last):
File "/usr/bin/pdfreflow", line 8, in <module>
load_entry_point('calibre==0.4.72', 'console_scripts', 'pdfreflow')()
File "build/bdist.linux-i686/egg/calibre/ebooks/lrf/pdf/reflow.py", line 419, in main
File "build/bdist.linux-i686/egg/calibre/ebooks/lrf/pdf/reflow.py", line 378, in __init__
File "build/bdist.linux-i686/egg/calibre/ebooks/lrf/pdf/reflow.py", line 365, in generate_xml
calibre.ebooks.ConversionError: /bin/sh: pdftoxml.exe: command not found

kovidgoyal
06-20-2008, 01:10 PM
pdfreflow isn't complete right now

iacchi
06-20-2008, 01:19 PM
ok, thanks

iacchi
07-20-2008, 05:07 AM
Hi kovid, I get this:


'module' object has no attribute 'unlink'
Detailed traceback:
Traceback (most recent call last):
File "/usr/lib/python2.5/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "build/bdist.linux-i686/egg/calibre/parallel.py", line 500, in remove_ipc_socket
AttributeError: 'module' object has no attribute 'unlink'

every time I close calibre gui 0.4.78 on linux.

kovidgoyal
07-20-2008, 03:13 PM
Will be fixed in the next release.

iacchi
09-22-2008, 03:53 PM
Hi Kovid,
I get this error updating to 0.4.85 (during calibre_postinstall execution):


Setting up bash completion... failed
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/calibre/linux.py", line 176, in setup_completion
File "build/bdist.linux-i686/egg/calibre/ebooks/lrf/comic/convert_from.py", line 21, in <module>
File "build/bdist.linux-i686/egg/calibre/ebooks/epub/__init__.py", line 13, in <module>
File "build/bdist.linux-i686/egg/calibre/ebooks/html.py", line 16, in <module>
File "/usr/lib/python2.5/site-packages/lxml/html/soupparser.py", line 7, in <module>
from BeautifulSoup import \
ImportError: No module named BeautifulSoup
Traceback (most recent call last):
File "/usr/bin/calibre_postinstall", line 8, in <module>
load_entry_point('calibre==0.4.85', 'console_scripts', 'calibre_postinstall')()
File "build/bdist.linux-i686/egg/calibre/linux.py", line 430, in post_install
File "build/bdist.linux-i686/egg/calibre/linux.py", line 304, in setup_completion
UnboundLocalError: local variable 'manifest' referenced before assignment

kovidgoyal
09-22-2008, 03:59 PM
sudo easy_install -U BeautifulSoup

kovidgoyal
09-22-2008, 03:59 PM
sudo easy_install BeautifulSoup

iacchi
09-22-2008, 04:03 PM
Thanks!

iacchi
01-07-2009, 03:31 AM
I don't know if there's a newer topic to discuss these things, but with the last version of calibre (0.4.126) when I install using the binary installer under linux I get this error:


Setting up bash completion...
Traceback (most recent call last):
File "/tmp/init.py", line 45, in <module>
File "/home/kovid/work/calibre/src/calibre/linux.py", line 482, in binary_install
File "/home/kovid/work/calibre/src/calibre/linux.py", line 452, in post_install
File "/home/kovid/work/calibre/src/calibre/linux.py", line 213, in setup_completion
File "/home/kovid/work/calibre/src/calibre/linux.py", line 118, in opts_and_exts
File "/home/kovid/work/calibre/src/calibre/linux.py", line 77, in options
File "/home/kovid/work/calibre/src/calibre/ebooks/epub/from_any.py", line 163, in option_parser
TypeError: not all arguments converted during string formatting
/usr/local/calibre/calibre_postinstall: line 7: 6637 Segmentation fault $loader "$@"


And when I open yakuake for the first time I find this error at the beginning:

bash: /etc/bash_completion.d/calibre: line 280: unexpected EOF while looking for matching `"'
bash: /etc/bash_completion.d/calibre: line 281: syntax error: unexpected end of file


Hope it helps

kovidgoyal
01-07-2009, 12:35 PM
This is a bug in the Italian translation. Will be fixed in the next release. #57 in Launchpad

iacchi
01-07-2009, 01:28 PM
Ok, I translated it again. Which was my mistake in the previous translation?

kovidgoyal
01-07-2009, 01:33 PM
You missed out the bottom line that included two %s

The %s characters indicate formatting fields, hence the error about string formatting