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
08-05-2007, 08:36 PM
The beta gui is now the default gui. Thanks to everyone that submitted bug reports.

Linux users: If you try to convert more than one document at a time, you may experience crashes. This is due to a bug in PyQt, you have to upgrade SIP and PyQt manually to a development snapshot, or just convert one thing at a time ;-)

sea2stars
08-05-2007, 11:54 PM
C:\Program Files\libprs500>libprs500-beta
Traceback (most recent call last):
File "main.py", line 522, in <module>
File "main.py", line 516, in main
File "main.py", line 103, in __init__
File "libprs500\gui2\library.pyo", line 345, in set_database
File "libprs500\gui2\library.pyo", line 95, in set_database
File "libprs500\library\database.pyo", line 569, in __init__
File "libprs500\library\database.pyo", line 557, in create_version1
sqlite3.OperationalError: table books already exists

KaiGoth
08-06-2007, 12:16 AM
Had a problem updating library (submitted ticket). Should we uninstall first or delete our old database?

kovidgoyal
08-06-2007, 12:22 AM
thats a surpassingly weird error. Did you launch two copies? Try deleting the file library1.db (in documents and seetings\user name in XP and \users\username in vista and try again.

kovidgoyal
08-06-2007, 12:23 AM
It should migrate your old database. the dialog has a progress bar did it not show any movement?

sea2stars
08-06-2007, 12:27 AM
That did the trick. Yeah. I must've run another window.

KaiGoth
08-06-2007, 12:36 AM
Well, once clearing the old database (manually deleting in old GUI) and deleting library1.db (using Mac OS X BTW), then restarting, I no longer get the update message. It recreates library1.db, but I still can not add any files.

I then went and added a file using the old GUI, deleted library1.db and started the new GUI. Same hang on updating. Although it "seems" to create the database, it's just that the message window never goes away.

Also, the windows that pop-up for adding files are different. It is not the same "finder" style it was previously, more of a old style window.

sea2stars
08-06-2007, 12:37 AM
Next error, after trying to add any books through XP; tried lrf and lit.

Traceback (most recent call last):
File "main.py", line 245, in add_books
File "libprs500\gui2\library.pyo", line 99, in add_books
File "libprs500\library\database.pyo", line 857, in add_books
IntegrityError: books.series_index may not be NULL

kovidgoyal
08-06-2007, 12:41 AM
@sea2stars: That's an actual bug v0.3.88 will be on the servers in about 30mins.

kovidgoyal
08-06-2007, 12:48 AM
@kaigoth: Yeah the old style dialog is the price of custom icons

The adding books bug is the same one that's affecting sea2stars an should be fixed in 89.

KaiGoth
08-06-2007, 01:03 AM
@kaigoth: Yeah the old style dialog is the price of custom icons

The adding books bug is the same one that's affecting sea2stars an should be fixed in 89.

Cool on the fix, bummer on the dialog.

Will download the update shortly!

Thanks for work!

KaiGoth
08-06-2007, 01:57 AM
OK, file add seems to work now, but still get the database updating problem. It seems to complete, the message window just never goes away.

kovidgoyal
08-06-2007, 02:28 AM
When you say it seems to complete you mean the progress bar reaches 100%. I assume there are no messages in the terminal? Can you send me your library.db (if it's not too big), as I cant reproduce this error with mine.

On running it a second time all the files have been imported?

sammykrupa
08-06-2007, 08:31 AM
Much nicer on the Mac, thanks.

Not allowed to import PDF files though?

Sam Krupa

kovidgoyal
08-06-2007, 09:54 AM
Much nicer on the Mac, thanks.

Not allowed to import PDF files though?

Sam Krupa

Oversight. Will be in next version. You can choose all files for the moment.

sammykrupa
08-06-2007, 09:57 AM
Thanks a lot man.

KaiGoth
08-06-2007, 10:33 AM
When you say it seems to complete you mean the progress bar reaches 100%. I assume there are no messages in the terminal? Can you send me your library.db (if it's not too big), as I cant reproduce this error with mine.

On running it a second time all the files have been imported?

Attached old and new libraries, less than 500K each. Only message in terminal is "Migrating database from pre 0.4.0 version". The progress bar never actually moves at all, but it seems to complete because once I kill it and restart, my files will show up just fine and I can add/delete without problems now.

sammykrupa
08-06-2007, 01:47 PM
Mac bug:

Adding an available format to a book already in the library doesn't work.

kovidgoyal
08-06-2007, 02:15 PM
Attached old and new libraries, less than 500K each. Only message in terminal is "Migrating database from pre 0.4.0 version". The progress bar never actually moves at all, but it seems to complete because once I kill it and restart, my files will show up just fine and I can add/delete without problems now.

Thanks this bug will be fixed in the next release.

kovidgoyal
08-06-2007, 03:14 PM
Mac bug:

Adding an available format to a book already in the library doesn't work.

Macs are strange ;-)

Releasing 0.3.90 which fixes this bug and KaiGoth's database import bug. Should be on the servers in ~30mins.

sammykrupa
08-06-2007, 03:21 PM
Macs are always perfect (-:

Linux and Windows are strange (-:

beartard
08-06-2007, 05:00 PM
Looks and works great as usual. Thanks, Kovid! Is the constant polling of the USB line a bug or a feature? I notice that while libprs500 is running, my scanner is keeps re-init-ing.

This is on a Kubuntu Linux testing system, so I dunno if it's fair to report it to you or not. ;-)

kovidgoyal
08-06-2007, 05:15 PM
Hmm the only polling that happens is a periodic scan of the USB buses to see if the reader has been connected or disconnected. I don't know why that should cause your scanner to re-init. May be a libusb bug.

AndyQ
08-06-2007, 05:17 PM
Well, just installed (Ubuntu) following the instructions at your site - no previous installation. The GUI comes up, however when I click Add books, I get the following exception:

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

In addition, noticed that when the Gui starts, I get the following message in the terminal:
QObject::connect: Cannot queue arguments of type 'PyQt_PyObject'
(Make sure 'PyQt_PyObject' is registered using qRegisterMetaType().)

Note - I don't have the reader connected at this point.

kovidgoyal
08-06-2007, 05:44 PM
You need to upgrade to PyQt 4.3.

AndyQ
08-06-2007, 06:35 PM
I'm already using PyQt 4.3 (fresh install - needed it for Eric 4)

kovidgoyal
08-06-2007, 06:38 PM
what version of qt do you have? the restore state function was introduced in 4.3

http://doc.trolltech.com/4.3/qfiledialog.html#restoreState

KaiGoth
08-06-2007, 06:56 PM
Just tested, the new version does fix the update library issue. In fact, it was so fast it was just a blip on the screen!

The only problem I now have adding books is that I can only select one file at a time, whereas the old one allowed multiple selections.

beartard
08-06-2007, 07:07 PM
Thanks again, man. Of all the things on that bus, only the scanner and two printers seem to be affected. Every three seconds or so, the line seems to reset. Could very well be a testing version of libusb in Ubuntu Gutsy.

A few comments on the interface...
* I miss drag'n'drop, but I don't mind losing it for a wider user base (even if they happen to be weird windows users).
* The loss of perpetual progress bars is nice; however, I don't see any indication anymore (aside from the reader's screen) that books are being sent.
* Are your interface icons taken from the OS or are they in your distribution? The "send to device" icon I see is more like a chocolate phone than a reader.
* There should be a better term than "delete books." I always wonder if it's going to trash my original files on my computer, or just remove it from the library.

Something I've wondered, too. What happens to files in the library if they're moved on the hard drive? For example, I store all my books in a "reader" folder. If I copy them to the device, and my reader folder gets moved, what does libprs500 do if I delete the book from the device and subsequently want to re-send it?

Just a few questions and constructive criticisms. Far be it from me to bitch. I can only get by with half-decent bash scripting. ;-) Again, very good work, Kovid, and thanks for doing it for us.
Hmm the only polling that happens is a periodic scan of the USB buses to see if the reader has been connected or disconnected. I don't know why that should cause your scanner to re-init. May be a libusb bug.

kovidgoyal
08-06-2007, 07:18 PM
It's actually OSX that has the problems with drag'n drop

doesn't the hourglass in the bottom right corner rotate for you? Clicking on it will bring up a listing of active jobs

the icons are shamelessly stolen from the oxygen kde theme. I decided to move to svg icons and that phone icon was the best I could find. If you know of a better one, send it my way.

the library doesn't touch your hard drive it stores the files internally in a database, another design decision based on its cross platform nature. At some point i'll implement a save button that will export files from the database to the hard drive.

Delete books does just that deletes books from either the reader or the internal database. If you have a suggestion for a better term, I'm all ears.

KaiGoth
08-06-2007, 07:18 PM
...The loss of perpetual progress bars is nice; however, I don't see any indication anymore (aside from the reader's screen) that books are being sent...


On the first beta version, the bottom right corner hour glass would spin. Haven't tried uploading files to the reader with .90 yet.

KaiGoth
08-06-2007, 07:19 PM
Kovid,

Do you have a features/requirements list for the GUI? There are a ton of things I would love to see added, but I'm betting most of them are already on your to-do list.

Thanks,
-KG

kovidgoyal
08-06-2007, 07:23 PM
Only in my head i'm afraid

kovidgoyal
08-06-2007, 08:08 PM
v0.3.91 should soon be on the servers. It has a fix for a nasty deletion bug in the database view and also a refactoring of the code to sync metadata on the device, in preparation for supporting collections. Multiple file selection is back.

As a result you may find that you lose history bookmarks when you upload/delete from the reader, in which case let me know.

EDIT: And thanks for all the bug reports so far. If I had to do all that testing on 3 platforms, I would simply never have time for coding.

KaiGoth
08-06-2007, 08:09 PM
Only in my head i'm afraid

hahaha, guess I'll just have to enter enhancement request tickets! Would you prefer them individually or bundled?

:)

Thanks again for a great tool.

kovidgoyal
08-06-2007, 08:10 PM
individual is better.

KaiGoth
08-06-2007, 08:19 PM
Oh, just noticed that the cover image no longer shows up in the bottom right corner, just the default tent.

kovidgoyal
08-06-2007, 08:52 PM
For all books?

KaiGoth
08-06-2007, 09:04 PM
For all books?

Actually, they seem to be there when displayed under the reader, but not the library. Also, the only books on the reader that display a cover, are the ones that were added through the Sony Connect app. I deleted a few books from the reader, and re-added using libprs500, no cover.

beartard
08-06-2007, 09:15 PM
I sent three books to the reader at once and didn't notice any rotation. As I said, I had to look at the reader for activity to be sure.

And as for the icons, that was just a small quibble. I use KDE. For my .lrf files, I've set the sytem up to show an icon of the reader itself. For libprs500, I set up a menu item using the same icon with the ubuntu logo superimposed on the screen.

Thanks for answering the question about the library versus the hard drive. I'm still getting used to the library being a database file, rather than a representation of the files on my drive.

And as for the "delete" function, something that makes it clear that it's just a removal (ie "remove from device" or "remove from library") would make me feel better. The first time I used the GUI, I was actually worried that "delete" would get rid of my archived file on the hard drive when I was just removing it from the library.

It's actually OSX that has the problems with drag'n drop

doesn't the hourglass in the bottom right corner rotate for you? Clicking on it will bring up a listing of active jobs

the icons are shamelessly stolen from the oxygen kde theme. I decided to move to svg icons and that phone icon was the best I could find. If you know of a better one, send it my way.

the library doesn't touch your hard drive it stores the files internally in a database, another design decision based on its cross platform nature. At some point i'll implement a save button that will export files from the database to the hard drive.

Delete books does just that deletes books from either the reader or the internal database. If you have a suggestion for a better term, I'm all ears.

kovidgoyal
08-06-2007, 09:22 PM
You'll only see the cover if you add a cover using the edit metadata dialog. It doesn't pick up covers automatically from books.

kovidgoyal
08-06-2007, 09:32 PM
How about "Remove books"? Does the number of jobs change (under the hourglass)?

KaiGoth
08-06-2007, 09:41 PM
You'll only see the cover if you add a cover using the edit metadata dialog. It doesn't pick up covers automatically from books.

Ahh, OK.

Maybe I'll add this as a feature request! :D

kovidgoyal
08-06-2007, 10:02 PM
i think there's already a request for that. Once I integrate a GUI for the 2lrf tools it wont be necessary assuming you use the GUI to do the conversion.

KaiGoth
08-06-2007, 10:39 PM
i think there's already a request for that. Once I integrate a GUI for the 2lrf tools it wont be necessary assuming you use the GUI to do the conversion.

Cool, but will I really need to use the GUI instead of the CLI? The files on my reader now were converted using lit2lrf, and uploaded via Sony Connect. I did zero meta-data changes. The only option used in lit2lrf was --delta-font=-1.25. I'm guessing that means the Sony software extracted the cover image, since I can see it when connecting to libprs500. Can the GUI not extract as well?

kovidgoyal
08-06-2007, 10:47 PM
the connect software extracts a low quality thumbnail not the full cover. I don't want libprs500 to do that.

KaiGoth
08-06-2007, 10:58 PM
the connect software extracts a low quality thumbnail not the full cover. I don't want libprs500 to do that.

Ahh, gotcha. I guess it doesn't really matter for me, as I don't really need thumbnails or anything. Come to think of it, the area taken up by the hourglass and the image bookmark is pretty large (making less books visible without scrolling). Any reason they couldn't be put to the top with the other icons, but shifted to the right?

kovidgoyal
08-06-2007, 11:05 PM
Coz there are going to be a lot more icons in the future ;-)

KaiGoth
08-07-2007, 12:11 AM
Coz there are going to be a lot more icons in the future ;-)

hahaha

Awesome!

How about a preferences/options section with a choice to make the icons smaller then? I don't know about the windows/linux version, but the ones in Mac OS X are huge.

kovidgoyal
08-07-2007, 12:18 AM
Yeah I like em huge :-) They're so purrty

KaiGoth
08-07-2007, 12:29 AM
Yeah I like em huge :-) They're so purrty

hahaha
:D

They definitely CANNOT be ignored!

KaiGoth
08-07-2007, 01:08 AM
Wow, in the hour since I downloaded .90, you are already up to .92?!?!

I hope one of those updates includes the winning powerball numbers every week!

EDIT:
Nice! Just saw that you added a tag for book # under the series tag. These will definitely be the primary tags I use, as 95% of my entertainment reading is series based!
Thanks!

EDIT:
Cool, just noticed I can import multiple files now too! Looking good!

kovidgoyal
08-07-2007, 01:20 AM
Mostly just bug juice ;-)

AndyQ
08-07-2007, 04:28 PM
what version of qt do you have? the restore state function was introduced in 4.3

http://doc.trolltech.com/4.3/qfiledialog.html#restoreState

Well, I have QT4.3.0.4 however I suspect that for some reason, QT3 is being picked up by default.

Not sure how I can change this - I've tried setting QTDIR to /usr/share/qt4 but that mode no difference.

kovidgoyal
08-07-2007, 04:33 PM
python
>>> from PyQt4.Qt import qVersion
>>> qVersion()

AndyQ
08-07-2007, 04:53 PM
python
>>> from PyQt4.Qt import qVersion
>>> qVersion()


It claims that I'm using 4.3.0:

Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4.Qt import qVersion
>>> qVersion()
'4.3.0'

kovidgoyal
08-07-2007, 05:01 PM
ls -l `which easy_install`

beartard
08-07-2007, 05:02 PM
That sounds a lot "nicer" to me. ;-)

And no, I never saw the hourglass icon (or its associated number) change during my test.

How about "Remove books"? Does the number of jobs change (under the hourglass)?

kovidgoyal
08-07-2007, 05:05 PM
clicking on the hourglass icon should bring up a dialog of active jobs. keep that to one side and then send a book to the reader. The job should show up in the dialog. Does it?

AndyQ
08-07-2007, 05:08 PM
ls -l `which easy_install`

ls -l `which easy_install`
-rwxr-xr-x 1 root root 281 2007-03-29 12:52 /usr/bin/easy_install

kovidgoyal
08-07-2007, 05:21 PM
hmm i'm stumped. the version of pyqt being used in libprs500 is obviously linked to a pre 4.3.0 qt. I don't see how though. try checking out libprs500 svn https://libprs500.kovidgoyal.net/wiki/Development
(delete the libprs500 .egg file from /usr/lib/python2.5/site-packages first)

kovidgoyal
08-07-2007, 05:32 PM
i just tested it on a kubuntu box and i had to compile and install pyqt 4.3 manually to get rid the the qregistermetatype messages. BUt after that it works fine.

AndyQ
08-07-2007, 05:40 PM
Thats what I did. Where di dyou get your PyQt 4.3 from? I got mine from the riverbank computing site :- PyQt-x11-gpl-4.3.tar.gz

kovidgoyal
08-07-2007, 05:53 PM
yeah me too.

beartard
08-08-2007, 05:50 PM
Kovid, where is the Linux libprs500 database kept? I'm running into a problem where libprs500 tells me a book is on my reader already when it's, in fact, not there.

kovidgoyal
08-08-2007, 05:53 PM
~/library1.db

Must be a corrupted book on the reader. the next release should fix that issue.

beartard
08-08-2007, 06:19 PM
thanks, man.

kovidgoyal
08-09-2007, 03:36 AM
v0.3.93 is on its way to the servers with support for creating collections on the device. The interface is considerably more powerful than in the connect software. It's based on the concept of tags. Whenever you upload a book to the reader with tags, collections corresponding to each tag are automatically created. You can edit the collections in the reader view by editing the tags.

The code for this is completely new and has received only the most rudimentary testing, so it's likely crawling with bugs.

There have been a number of other bug fixes and code optimizations.

oddtom
08-13-2007, 08:26 AM
Kovid,

I installed 0.3.94 today on an Ubuntu 7.04 system and tried to run libprs500-beta with the following error upon startup:

Traceback (most recent call last):
File "/usr/bin/libprs500-beta", line 8, in <module>
load_entry_point('libprs500==0.3.94', 'console_scripts', 'libprs500-beta')()
File "build/bdist.linux-i686/egg/libprs500/gui2/main.py", line 555, in main
File "build/bdist.linux-i686/egg/libprs500/gui2/main.py", line 53, in __init__
File "build/bdist.linux-i686/egg/libprs500/gui2/main_ui.py", line 104, in setupUi
File "build/bdist.linux-i686/egg/libprs500/gui2/library.py", line 360, in __init__
File "build/bdist.linux-i686/egg/libprs500/gui2/library.py", line 360, in <genexpr>
ValueError: invalid literal for int() with base 10: ''

Any ideas? The regular libprs500 program runs without any errors. I'd really like to be able to use the beta gui to bypass the file limit on the root directory of SD cards that I've been having.

Thanks again for a great suite!

--Tom

kovidgoyal
08-13-2007, 11:23 AM
Released v0.3.95 with the ability to download news feeds with a single click. Currently supports The BBC, The New York Times and Newsweek.

@oddtom: That bug should be fixed in 0.3.95.

oddtom
08-14-2007, 04:14 AM
Man, I feel bad responding about these bugs on Ubuntu. I hope you don't mind. The stable gui and CLI tools work great, which I'm happy about since I don't have to run Windows. :happydance:

Here's the deal: The new version fixed the startup bug. It imports the ~/library.db into ~/library1.db just fine. However, libprs500-beta locks up when the Reader is plugged in and produces this error on the console:

QObject::connect: Cannot queue arguments of type 'PyQt_PyObject'
(Make sure 'PyQt_PyObject' is registed using qRegisterMetaType().)
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/device.py", line 52, in run
TypeError: argument 0 of signal QThread.connected(PyQt_PyObject,PyQt_PyObject) has an invalid type

QObject::setParent: New parent must be in the same thread as the previous parent
QFont: It is not safe to use text and fonts outside the GUI thread
Xlib: unexpected async reply (sequence 0xf2ee)!


I'm going to start reading up on Python and see if I can help with debugging on Ubuntu. Incidentally, what platform are you developing the code on?

Regards,
--Tom

sammykrupa
08-14-2007, 12:21 PM
Love the automatic downloading of newsfeeds, simply brilliant.

A great companion option in the GUI would be the ability to paste in a website URL and have it put that website directly on the reader.

kovidgoyal
08-14-2007, 12:44 PM
@oddtom:
Have you installed pyqt 4.3 and qt 4.3 on ubuntu? I develop on gentoo. This line

Make sure 'PyQt_PyObject' is registed using qRegisterMetaType()

typically indicates a messed up PyQt installation.

@sammykrupa:
Yeah the reason I haven't done it is that most websites aren't suitable for automatic conversion into LRF, so I don't want to give users the impression that they can enter a URL and have it just work.

oddtom
08-14-2007, 04:41 PM
:smack:

Sorry Kovid. I thought I had the right versions of python-qt and iibqt installed, but I should have paid closer attention to the package information. Currently, though, libqt-4.3 conflicts with 4.2 in aptitude and there are a number of programs I depend upon for the latter, so I guess I'm going to have to just wait for the next update to Ubuntu until I can try out the beta gui.

Ah, well. Thanks for the help and patience.

--Tom

beartard
08-14-2007, 05:20 PM
I think most of the bugs are negligible in Kubuntu Gutsy. I can't get an rss feed that doesn't cause my reader to crash while formatting, however.

kovidgoyal
08-17-2007, 12:17 AM
v0.3.96 is on its way to the servers
It has a new dialog for GUI based format conversion. The dialog itself is fully functional, but clicking OK doesn't do anything. So if you have comments on the dialog design, now's the time.

linux users need to install mechanize and ClientForm. THe wiki has instructions for the various distros.

sammykrupa
08-17-2007, 08:45 AM
On the Mac, the application crashes right after entering your NYT password and username.


Amazing work none the less.

Sam Krupa

kovidgoyal
08-17-2007, 03:25 PM
Hmm works for me on the Mac. What error do you get?

On the Mac, the application crashes right after entering your NYT password and username.


Amazing work none the less.

Sam Krupa

sammykrupa
08-17-2007, 04:09 PM
Terminal says:

Bus error


It worked once if I moved my library db and let libprs500 create a new one. Also, when I restart libprs500 it shows my password as my username.

BTW, does libprs500 actually embed the entire contents of added ebooks into the library1.db file?

kovidgoyal
08-17-2007, 05:37 PM
yes it does.

enjoilax
08-17-2007, 06:09 PM
Pleases to upload new version!

I'm dying without it here. Ungh.

kovidgoyal
08-17-2007, 06:24 PM
it's already uploaded.

AndyQ
08-17-2007, 06:27 PM
hmm i'm stumped. the version of pyqt being used in libprs500 is obviously linked to a pre 4.3.0 qt. I don't see how though. try checking out libprs500 svn https://libprs500.kovidgoyal.net/wiki/Development
(delete the libprs500 .egg file from /usr/lib/python2.5/site-packages first)

Well, just tried to run Eric4 and got a QScintilla error, so after a bit of searching around, re-installed PyQT4.3 and that seems to have fixed the gui. No longer am I getting the exceptions when I click add books (oh, and eric4 works too). Most odd.

Now just have to decide when to upgrade to the new version........

beartard
08-17-2007, 11:34 PM
Not sure if it's just me, but I got this error while trying to fetch the BBC rss feed tonight.

unpack requires a string argument of length 6
Detailed traceback:
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/main.py", line 503, in news_fetched
File "build/bdist.linux-i686/egg/libprs500/gui2/main.py", line 273, in _add_books
File "build/bdist.linux-i686/egg/libprs500/ebooks/metadata/meta.py", line 24, in get_metadata
File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/meta.py", line 256, in get_metadata
File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/meta.py", line 475, in __init__
File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/meta.py", line 76, in __get__
File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/meta.py", line 343, in restore_pos
File "build/bdist.linux-i686/egg/libprs500/ebooks/lrf/meta.py", line 519, in unpack
File "struct.py", line 87, in unpack
return o.unpack(s)
error: unpack requires a string argument of length 6

kovidgoyal
08-18-2007, 12:24 AM
Bug. Will be fixed in next version.

beartard
08-18-2007, 11:43 AM
I'm buying you a beer one of these days.

megacoupe
08-18-2007, 05:06 PM
I'm a new Sony eReader owner and was glad to find libprs500 as an alternative to the clunky CONNECT software. After using it for a few days, however, I've found it to be almost useless.

Initially, I used html2lrf to convert ebooks. When dragging and dropping my newly created lrf files from the Library to the Reader, I would always get an error message. The book ended up on the device, but the error message was still there. Regretfully, I did not copy the error messages to post here, but they made references to specific lines of code in the program.

After I discovered Book Designer, I started to use BD exclusively for converting my ebooks. When trying to transfer BD-created lrf's (either self-made or downloaded from the ebooks section) to my eReader, libprs500 did not want to comply. The error message this time told me that the book I was transferring was already on the device (which I assure you, it was not). At first, this didn't bother me because the books still somehow ended up on the device. This morning, however, libprs500 gives me the same error, without the benefit of my books actually getting where I wanted them to go.

Besides the above mentioned issues, I've found that libprs500 needs to be closed and opened repeatedly just to refresh the Library and eReader lists for newly transferred books.

Although I love the idea behind libprs500 in concept (a much simpler method of moving books around than CONNECT), I have found too many problems with the program for it to be useful to me. It's unfortunate, but I will be uninstalling libprs500 and going back to CONNECT so I can get some new books on my eReader already!

Are there any other programs available for transferring ebooks or is CONNECT the only other alternative?

kovidgoyal
08-18-2007, 05:53 PM
You should switch to using the beta gui of libprs500. The old GUI has a lot of bugs on non linux platforms. See the thread in the reader developer's section. Its a sticky. And if you find problems, report them preferably with detailed error messages so they can be fixed.

megacoupe
08-18-2007, 07:40 PM
The installation file I used was: libprs500-0.3.95.exe

Is that not the beta GUI? I just downloaded it for the first time about 3-4 days ago and I've never had any other installation of libprs500.

I apologize for not holding onto the error messages I had before. If I ever decide to give libprs500 another shot, I'll be sure to post them on this forum. To be honest though, I think I'd rather wait for a newer release before trying the current one again.

JSWolf
08-18-2007, 07:44 PM
The installation file I used was: libprs500-0.3.95.exe

Is that not the beta GUI? I just downloaded it for the first time about 3-4 days ago and I've never had any other installation of libprs500.

I apologize for not holding onto the error messages I had before. If I ever decide to give libprs500 another shot, I'll be sure to post them on this forum. To be honest though, I think I'd rather wait for a newer release before trying the current one again.
Since your version is now out of date, the solution is to download the 0.3.99 version and have a go at that one and then see what happens.

kovidgoyal
08-18-2007, 07:56 PM
The installation file I used was: libprs500-0.3.95.exe

Is that not the beta GUI? I just downloaded it for the first time about 3-4 days ago and I've never had any other installation of libprs500.

I apologize for not holding onto the error messages I had before. If I ever decide to give libprs500 another shot, I'll be sure to post them on this forum. To be honest though, I think I'd rather wait for a newer release before trying the current one again.

Did you run the beta GUI or the old one? To run the beta GUI you need to launch from a terminal, clicking the icon launches the old GUI.

AndyQ
08-19-2007, 05:27 AM
Just upgraded to 0.3.99 and its looking very nice, however a couple of issues.

First, I went to add books, selected an html file and got the error:
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/main.py", line 279, in _add_books
TypeError

Then, tried to use the convert e-books button and it displayed the window where I set various options but didn't seem to do anything when I clicked OK.

Next, when I tried to download the BBC RSS feedl, it core dumped:
ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 8c271c0. Receiver 'LRFSingleDialog' (of type 'QWidget') was created in thread 872a7f0", file kernel/qcoreapplication.cpp, line 253
Aborted (core dumped)

However, when I restarted and tried it again, it seems to be working this time. and has created an lrf file OK.

Finally, when I select the above LRF file and click the convert e-books button it gives me the following error:
list index out of range
Detailed traceback:
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/main.py", line 535, in convert_single
File "build/bdist.linux-i686/egg/libprs500/gui2/dialogs/lrf_single.py", line 80, in __init__
IndexError: list index out of range

kovidgoyal
08-19-2007, 02:36 PM
The convert ebooks dialog is not functional as yet. The other errors have been fixed. Thanks.

kovidgoyal
08-21-2007, 09:05 PM
Released 0.3.102 with a functional GUI for ebook conversion.

JSWolf
08-21-2007, 09:29 PM
Amny other changes to 0.3.102 or an I OK with 0.3.101 since I like the CLI?

kovidgoyal
08-21-2007, 09:38 PM
I think there was a little refactoring in html2lrf's internals, but nothing major.

iacchi
08-24-2007, 08:32 PM
First of all a question: I've downloaded and installed the latest version (0.3.104) but it doesn't work well, and I need something usable to update my library. Could someone upload and give me a 0.3.79 installer for Windows?

And now, let's report the errors I have.

When I try to import to library a pdf file I have this error:

Traceback (most recent call last):
File "main.py", line 208, in add
File "main.py", line 56, in function
File "main.py", line 216, in add_books
File "libprs500\gui\widgets.pyo", line 657, in add_book
File "libprs500\gui\database.pyo", line 65, in add_book
File "libprs500\ebooks\metadata\meta.pyo", line 27, in get_metadata
File "libprs500\ebooks\metadata\pdf.pyo", line 34, in get_metadata
File "libprs500\ebooks\metadata\pdf.pyo", line 59, in get_metadata_from_file
TypeError: __nonzero__ should return bool or int, returned unicode

When I try to import an RTF file I got this error:

Traceback (most recent call last):
File "main.py", line 208, in add
File "main.py", line 56, in function
File "main.py", line 216, in add_books
File "libprs500\gui\widgets.pyo", line 657, in add_book
File "libprs500\gui\database.pyo", line 64, in add_book
IOError: [Errno 13] Permission denied: u'C:\\[path]\\file.rtf'
(I'm administrator on my system)

If I try to add to library an lrf file (converted from a lit file, which worked with the previous version of libprs500) it works and I can send it to the reader, too. The problem is that when I open it on the reader, 50% of the files doesn't work and I have to do some tricks to unlock the reader.

I've tried to open the beta gui, too, but I get this error:

Traceback (most recent call last):
File "main.py", line 695, in <module>
File "main.py", line 689, in main
File "main.py", line 133, in __init__
File "libprs500\gui2\library.pyo", line 367, in set_database
File "libprs500\gui2\library.pyo", line 102, in set_database
File "libprs500\library\database.pyo", line 629, in __init__
File "libprs500\library\database.pyo", line 558, in create_version1
sqlite3.OperationalError: table books already exists


I've tried to install libprs500 on my Debian Lenny, too. I get error while downloading the file from the web using easy_install (I switched off my linuxbox now, if you need the error, tell me). I'm not sure I have the right version of python installed (maybe 2.4), but I don't think a download error is a matter of python version.

kovidgoyal
08-24-2007, 08:50 PM
The PDF import is a bug, I've fixed it in svn. I'm not sure why you're getting permission denied errors on the RTF file. I assume you replaced the actual path with [path]?

You can fix the beta GUI by deleting the file library1.db. How are you uploading the LRF files? And can you send me one of the lit files that doesn't work.

libprs500 wont work with python < 2.5 and unless you post the error I can't tell you about it.

iacchi
08-24-2007, 09:10 PM
I was able to load the new GUI. With this one, the RTF file problem disappears but not the one with the lrf files.

In the attachment you find a zip file with two books (in the original lit format and in the converted lrf one). If I load them with the connect software (using my other computer with winXP) everything goes well; if I use libprs500 the one with the "cognomi" word in its name (sorry they're in italian) just show up a blank page when I try to open it and force the reader to auto-reset. The other one doesn't show the end page when you open its summary (the menu option "End", just to be clear) and if you open it, it block the reader (you can unlock it plugging it to the PC).

For the linux error, if you don't mind I'll post the error message tomorrow. It's 2 o'clock in the morning here and I think I'll go to bed.

iacchi
08-24-2007, 09:22 PM
Another suggestion: on Windows the library.db file is stored in the main directory (C: or whatelse). It should be better to create an %appdata%\libprs500 directory and put all the user stuff in there, just as in linux.
I'm administrator on my PC so I have no problem, but some users may not have the rights to write on the main folder, so they couldn't manage their library.

kovidgoyal
08-24-2007, 11:50 PM
The library.db file is created in what python thinks is windows equivalent of the /home/user directory in linux. I'd be very surprised if that location was not user-writable.

tsgreer
08-25-2007, 02:09 AM
Holy crap! This GUI works awesome for creating ebooks. For me so far, they have come out way better than when I had to use terminal. I don't know what the difference is specifically, but it's way easier and the spacing looks way better. I was never that great at the terminal version.

Wait, I'm rambling because I have no bugs to report. Sorry! It works fine for me so far and I feel I can finally match what everyone else has been doing. Yay!

kovidgoyal
08-25-2007, 02:15 AM
Glad to hear it :)

iacchi
08-25-2007, 05:58 AM
The library.db file is created in what python thinks is windows equivalent of the /home/user directory in linux. I'd be very surprised if that location was not user-writable.
Maybe my python installation is stupid :P
It's a fact that I have the library.db in the C:\ folder, and from what I know, the C:\ folder is not writeable for a normal user without superuser rights. Maybe I'm wrong here.

Adrian
08-25-2007, 07:45 AM
When I tried to do the Fetch news using the new GUI, I selected NY Times and put in my username and pass, but it then crashed, saying 'Bus error'. Fetching the news using the command line (and the same user/pass) still works though.

iacchi
08-25-2007, 10:32 AM
I reached to start libprs500 on my Debian Lenny using Sid packages for python. When I open the beta gui, I get this error:

PacketError: 'libprs500.devices.prs500.prstypes.Answer packets must have a length of atleast 16 bytes. Got initializer of 5 bytes.
Failed to perform job: Get metadata from device
Further device related error messages will not be shown while this message is visible.
Detailed traceback:
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/jobs.py", line 67, in run
File "build/bdist.linux-i686/egg/libprs500/gui2/device.py", line 87, in books
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 168, in run_session
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 804, in books
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 168, in run_session
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 484, in get_file
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 403, in _bulk_read
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 390, in bulk_read_packet
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/prstypes.py", line 751, in __init__
PacketError: 'libprs500.devices.prs500.prstypes.Answer packets must have a length of atleast 16 bytes. Got initializer of 5 bytes.


And it doesn't show any book on my reader.

Mitchll
08-25-2007, 11:38 AM
I just loaded libprs500 on WIndows xp using the current file from your site. I am trying out the beta. I understand that after using it to convert book, the lrf file is stored only in db, is that correct. When I go to save book listed in library after conversion, I get the following error:

'NoneType' object is unsubscriptable
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 472, in save_to_disk
File "libprs500\gui2\library.pyo", line 114, in save_to_disk
File "libprs500\library\database.pyo", line 1008, in export_to_dir
File "ntpath.pyo", line 67, in join
File "ntpath.pyo", line 53, in isabs
File "ntpath.pyo", line 119, in splitdrive
TypeError: 'NoneType' object is unsubscriptable

Also, I loaded the drivers in and removed connect drivers, BUt I can't transfer book to ereader.
I feel I'm missing the obvious here somewhere...please help an old man.

kovidgoyal
08-25-2007, 12:14 PM
Maybe my python installation is stupid :P
It's a fact that I have the library.db in the C:\ folder, and from what I know, the C:\ folder is not writeable for a normal user without superuser rights. Maybe I'm wrong here.

Strange, what version of windows are you using?

kovidgoyal
08-25-2007, 12:14 PM
When I tried to do the Fetch news using the new GUI, I selected NY Times and put in my username and pass, but it then crashed, saying 'Bus error'. Fetching the news using the command line (and the same user/pass) still works though.

Hmm, try deleting the file ~/library1.db (you will loose any books in the library, if that's a problem, rename it instead).

iacchi
08-25-2007, 12:19 PM
Strange, what version of windows are you using?
Windows 2000 SP4

kovidgoyal
08-25-2007, 12:22 PM
That would explain it. It is created under Documents and Settings in XP and Users\user in Vista both of which are user writable. You should open a bug with the python devs about their mapping of '~' to C:\ in 2000.

kovidgoyal
08-25-2007, 12:29 PM
I reached to start libprs500 on my Debian Lenny using Sid packages for python. When I open the beta gui, I get this error:

PacketError: 'libprs500.devices.prs500.prstypes.Answer packets must have a length of atleast 16 bytes. Got initializer of 5 bytes.
Failed to perform job: Get metadata from device
Further device related error messages will not be shown while this message is visible.
Detailed traceback:
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/jobs.py", line 67, in run
File "build/bdist.linux-i686/egg/libprs500/gui2/device.py", line 87, in books
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 168, in run_session
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 804, in books
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 168, in run_session
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 484, in get_file
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 403, in _bulk_read
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/driver.py", line 390, in bulk_read_packet
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/prstypes.py", line 751, in __init__
PacketError: 'libprs500.devices.prs500.prstypes.Answer packets must have a length of atleast 16 bytes. Got initializer of 5 bytes.


And it doesn't show any book on my reader.

What doe the followinf commands give you on the command line

prs500 info
prs500 books

iacchi
08-25-2007, 12:48 PM
Here you are:

iacopo@hp:~$ prs500 info
Device name: Sony Reader
Device version: PRS-500/U
Software version: 1.0.03.07170
Mime type: application/x-bbeb-book



iacopo@hp:~$ prs500 books
Books in main memory:
1984 by George Orwell at /Data/media/books/CBUS12510000100J.lrf
The Italian’s Stolen Bride by Emma Darcy at /Data/media/books/CBUS12510000200K.lrf
Vanguard, Book One by David Mack at /Data/media/books/CBUS12510000300L.lrf
Excavation by James Rollins at /Data/media/books/CBUS12510000400M.lrf
Operation Guide by Sony Corporation at /Data/media/books/PRS500_OG.pdf
American Gods by Neil Gaiman at /Data/media/books/[ebook - ita] Neil Gaiman - American Gods.lrf
Il giro del mondo in 80 giorni by Jules Verne at /Data/media/books/[ebook - ita] Jules Verne - Il Giro Del Mondo In 80 Giorni.lrf
Sei personaggi in cerca d'autore by Luigi Pirandello at /Data/media/books/[ebook - ita] Luigi Pirandello - Sei Personaggi In Cerca D'Autore.lrf
Dalla terra alla luna by Jules Verne at /Data/media/books/[ebook - ita] Jules Verne - Dalla Terra Alla Luna.lrf
L'America secondo Giobbe by Giobbe Covatta at /Data/media/books/[ebook - ita] Giobbe Covatta - L' America secondo Giobbe.lrf
La storia di Otto Sync e White Knight by Unknown at /Data/media/books/La storia di Otto Sync e White Knight.pdf
Introduzione al quantum computing by Unknown at /Data/media/books/Introduzione al quantum computing.pdf
Harry Potter and the sorcerer's stone by Unknown at /Data/media/books/Harry Potter and the sorcerer's stone.rtf
La coscienza di Zeno by Italo Svevo at /Data/media/books/libprs500_11.lrf
Il libro dei cognomi strani by Anonimo at /Data/media/books/libprs500_17.lrf
Il dottor Futuro by Philip K. Dick at /Data/media/books/libprs500_16.lrf
The BBC [sab, 25 ago, 2007] by libprs500 at /Data/media/books/libprs500_0.3.104_n2pAeg.lrf

Books on storage card:

kovidgoyal
08-25-2007, 12:48 PM
I just loaded libprs500 on WIndows xp using the current file from your site. I am trying out the beta. I understand that after using it to convert book, the lrf file is stored only in db, is that correct. When I go to save book listed in library after conversion, I get the following error:

'NoneType' object is unsubscriptable
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 472, in save_to_disk
File "libprs500\gui2\library.pyo", line 114, in save_to_disk
File "libprs500\library\database.pyo", line 1008, in export_to_dir
File "ntpath.pyo", line 67, in join
File "ntpath.pyo", line 53, in isabs
File "ntpath.pyo", line 119, in splitdrive
TypeError: 'NoneType' object is unsubscriptable

Also, I loaded the drivers in and removed connect drivers, BUt I can't transfer book to ereader.
I feel I'm missing the obvious here somewhere...please help an old man.

The save to disk error is a bug that will be fixed in the next version. When you say you cannot transfer books to the reader what do you mean? Does the reader icon not show up in the GUI?

kovidgoyal
08-25-2007, 12:49 PM
Here you are:

iacopo@hp:~$ prs500 info
Device name: Sony Reader
Device version: PRS-500/U
Software version: 1.0.03.07170
Mime type: application/x-bbeb-book



iacopo@hp:~$ prs500 books
Books in main memory:
1984 by George Orwell at /Data/media/books/CBUS12510000100J.lrf
The Italian’s Stolen Bride by Emma Darcy at /Data/media/books/CBUS12510000200K.lrf
Vanguard, Book One by David Mack at /Data/media/books/CBUS12510000300L.lrf
Excavation by James Rollins at /Data/media/books/CBUS12510000400M.lrf
Operation Guide by Sony Corporation at /Data/media/books/PRS500_OG.pdf
American Gods by Neil Gaiman at /Data/media/books/[ebook - ita] Neil Gaiman - American Gods.lrf
Il giro del mondo in 80 giorni by Jules Verne at /Data/media/books/[ebook - ita] Jules Verne - Il Giro Del Mondo In 80 Giorni.lrf
Sei personaggi in cerca d'autore by Luigi Pirandello at /Data/media/books/[ebook - ita] Luigi Pirandello - Sei Personaggi In Cerca D'Autore.lrf
Dalla terra alla luna by Jules Verne at /Data/media/books/[ebook - ita] Jules Verne - Dalla Terra Alla Luna.lrf
L'America secondo Giobbe by Giobbe Covatta at /Data/media/books/[ebook - ita] Giobbe Covatta - L' America secondo Giobbe.lrf
La storia di Otto Sync e White Knight by Unknown at /Data/media/books/La storia di Otto Sync e White Knight.pdf
Introduzione al quantum computing by Unknown at /Data/media/books/Introduzione al quantum computing.pdf
Harry Potter and the sorcerer's stone by Unknown at /Data/media/books/Harry Potter and the sorcerer's stone.rtf
La coscienza di Zeno by Italo Svevo at /Data/media/books/libprs500_11.lrf
Il libro dei cognomi strani by Anonimo at /Data/media/books/libprs500_17.lrf
Il dottor Futuro by Philip K. Dick at /Data/media/books/libprs500_16.lrf
The BBC [sab, 25 ago, 2007] by libprs500 at /Data/media/books/libprs500_0.3.104_n2pAeg.lrf

Books on storage card:



Hmm and you still get the error in the GUI?

iacchi
08-25-2007, 12:52 PM
I have another error now, but still I can't access to my reader memory from the GUI, while I have no problem with the old one:

iacopo@hp:~$ libprs500-beta
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui2/library.py", line 507, in sort
File "build/bdist.linux-i686/egg/libprs500/gui2/library.py", line 496, in datecmp
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/books.py", line 47, in __get__
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/books.py", line 66, in <lambda>
File "_strptime.py", line 330, in strptime
(data_string, format))
ValueError: time data did not match format: data=Fri, 24 Aug 2007 23:57:12 GMT fmt=%a, %d %b %Y %H:%M:%S %Z

iacchi
08-25-2007, 12:57 PM
I get this error while triing to upload an rlf file using the old GUI:

Unable to send La coscienza di Zeno to device
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/libprs500/gui/main.py", line 349, in upload_books
File "build/bdist.linux-i686/egg/libprs500/gui/main.py", line 290, in update_models
File "build/bdist.linux-i686/egg/libprs500/gui/widgets.py", line 738, in sort
File "build/bdist.linux-i686/egg/libprs500/gui/widgets.py", line 731, in
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/books.py", line 47, in __get__
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/books.py", line 66, in
File "_strptime.py", line 330, in strptime
(data_string, format))
ValueError: time data did not match format: data=Fri, 01 Sep 2006 00:00:34 GMT fmt=%a, %d %b %Y %H:%M:%S %Z

kovidgoyal
08-25-2007, 01:02 PM
Wow Debian Lenny is cursed. That is an impossible error. According to the error message the fmt string doesn't match the date string, but they do as copy pasting them onto my system shows. I'm at a loss.

kovidgoyal
08-25-2007, 01:42 PM
I was able to load the new GUI. With this one, the RTF file problem disappears but not the one with the lrf files.

In the attachment you find a zip file with two books (in the original lit format and in the converted lrf one). If I load them with the connect software (using my other computer with winXP) everything goes well; if I use libprs500 the one with the "cognomi" word in its name (sorry they're in italian) just show up a blank page when I try to open it and force the reader to auto-reset. The other one doesn't show the end page when you open its summary (the menu option "End", just to be clear) and if you open it, it block the reader (you can unlock it plugging it to the PC).

For the linux error, if you don't mind I'll post the error message tomorrow. It's 2 o'clock in the morning here and I think I'll go to bed.

Both LRF files worked for me when I transfered them using the beta GUI.

iacchi
08-25-2007, 02:33 PM
I don't know what to say. I'll try libprs500 on WinXP, too.

iacchi
08-25-2007, 02:35 PM
Kovid, while triing the new version, do you have a windows installer of the 0.3.79 somewhere? I really need it to upload some books!

kovidgoyal
08-25-2007, 02:38 PM
No I don't. You can always use the command line:

prs500 book.lrf prs500:/Data/media/books

iacchi
08-25-2007, 02:55 PM
Ok, the new latest version (0.3.105) works with WinXP, but still not with Win2000. I still get the same error even on Debian.

kovidgoyal
08-25-2007, 03:13 PM
Unfortunately I cant debug on either debian or win2k, so I cant really help there.

iacchi
08-25-2007, 03:14 PM
There's something I can do?

kovidgoyal
08-25-2007, 03:24 PM
Well in debian you can check out svn and mess with the books.py file to try and fix the date fmt error. Instructions for svn are in the development section of the wiki.

Mitchll
08-25-2007, 03:25 PM
The save to disk error is a bug that will be fixed in the next version. When you say you cannot transfer books to the reader what do you mean? Does the reader icon not show up in the GUI?

No reader icon..from left to right...Add Books, Remove books, Edit Meta info,Send to device (when I click on this nothing happens) , Save to Disk, Fetch news, Convert ebooks.

Underneath that row, just llibrary icon.

Is it possible to get converted book from db to another folder ?

Thanks for a wonderful program..now if I can just learn to use it.

Mitch:smash:

iacchi
08-25-2007, 03:36 PM
Well in debian you can check out svn and mess with the books.py file to try and fix the date fmt error. Instructions for svn are in the development section of the wiki.

I'll do it. If you tell me what I need, I can try to do something even on Win2000. But you have to tell me which command I have to type to debug, 'cause I only know Pascal and PHP.

iacchi
08-25-2007, 03:49 PM
I've followed the wiki instructions, but I get this error:

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

kovidgoyal
08-25-2007, 03:57 PM
Should be python2.5 setup.py develop

kovidgoyal
08-25-2007, 03:58 PM
No reader icon..from left to right...Add Books, Remove books, Edit Meta info,Send to device (when I click on this nothing happens) , Save to Disk, Fetch news, Convert ebooks.

Underneath that row, just llibrary icon.

Is it possible to get converted book from db to another folder ?

Thanks for a wonderful program..now if I can just learn to use it.

Mitch:smash:

That indicates that the USB driver is not properly installed. Have you uninstalled the connect USB driver? If you have try re-installing libprs500.

Mitchll
08-25-2007, 04:27 PM
That indicates that the USB driver is not properly installed. Have you uninstalled the connect USB driver? If you have try re-installing libprs500.

I uninstalled driver, didn't help. Uninstalled connect and libprs500 restarted and reinstalled libprs500. That worked.

Is it possible to load a book in the db to some other directory?

Again, great program KUDOS

kovidgoyal
08-25-2007, 04:31 PM
Yeah in the save to disk dialog choose another directory.

iacchi
08-25-2007, 04:53 PM
Should be python2.5 setup.py develop

Ok, it worked.
I think I have to launch libprs500-beta now, right? Well, if it's the right thing, I get this error:

iacopo@hp:~/libprs500$ libprs500-beta
Traceback (most recent call last):
File "/usr/bin/libprs500-beta", line 8, in <module>
load_entry_point('libprs500==0.3.105', 'console_scripts', 'libprs500-beta')()
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)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2179, in load_entry_point
return ep.load()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1912, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/iacopo/libprs500/src/libprs500/gui2/main.py", line 15, in <module>
from libprs500.gui2.dialogs.password import PasswordDialog
File "/home/iacopo/libprs500/src/libprs500/gui2/dialogs/password.py", line 19, in <module>
from libprs500.gui2.dialogs.password_ui import Ui_Dialog
ImportError: cannot import name Ui_Dialog

kovidgoyal
08-25-2007, 04:56 PM
svn co https://svn.kovidgoyal.net/code/libprs500/trunk libprs500
cd libprs500 && make -C src/libprs500/gui2/
python2.5 setup.py develop (as root)


Did you run make?

Vienna01
08-25-2007, 05:31 PM
SW dtd. August 25, 2007 Version 0.3.105
MS Win XP Home w/SP2 up to date on MS released fixes.
Looking Good. I recognize it is Beta.

After converting html to lrf,
When attempting to SAVE,
received the following error msg:

Detailed traceback:
Traceback (most recent call last):
File "main.py", line 472, in save_to_disk
File "libprs500\gui2\library.pyo", line 114, in save_to_disk
File "libprs500\library\database.pyo", line 1013, in export_to_dir
KeyError: ''

This is similar to traceback posted by Mitchll #107

Do you want request for changes posted in Mobileread or http://libprs500.kovidgoyal.net/newticket ??

kovidgoyal
08-25-2007, 05:38 PM
When you convert the book make sure you specify an non-empty author sort field.

Mitchll
08-25-2007, 05:43 PM
Yeah in the save to disk dialog choose another directory.
get the following:

'NoneType' object is unsubscriptable
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 472, in save_to_disk
File "libprs500\gui2\library.pyo", line 114, in save_to_disk
File "libprs500\library\database.pyo", line 1008, in export_to_dir
File "ntpath.pyo", line 67, in join
File "ntpath.pyo", line 53, in isabs
File "ntpath.pyo", line 119, in splitdrive
TypeError: 'NoneType' object is unsubscriptable

kovidgoyal
08-25-2007, 05:44 PM
When you convert the book make sure you fill in the author sort field.

Mitchll
08-25-2007, 06:23 PM
When you convert the book make sure you fill in the author sort field.

that does it
thanks again
Mitch:2thumbsup

europas_ice
08-25-2007, 06:42 PM
How do I get the gui for ebook conversion? The only gui I can get has add books to library /delete books from library. I just downloaded the latest version -- 0.3.105

Also, do you have some sample html files that make nice ebooks using html2lrf?

kovidgoyal
08-25-2007, 06:50 PM
The gui is accessed by the command libprs500-beta. There's a demo file showing all the capabilities of html2lrf in the html2lrf sticky thread.

iacchi
08-25-2007, 07:17 PM
Did you run make?

Yes. Not as root, but I ran make.

kovidgoyal
08-25-2007, 07:22 PM
Yeah you dont have to run make as root. Does the file src/libprs500/gui2/dialogs/password_ui.py exist?

iacchi
08-25-2007, 07:26 PM
yes, it exists

kovidgoyal
08-25-2007, 07:30 PM
Hmm then I'm stumped again. Try the following:

python
>>>import libprs500.gui2.dialogs.password as p
>>>dir(p)


And can you reply by email, my email address is in any of the py files.

iacchi
08-25-2007, 07:43 PM
I've replied by e-mail as requested. If you prefer, I even have skype, IQC, Gtalk etc. (not MSN)

Stingo
08-26-2007, 11:06 AM
The gui is accessed by the command libprs500-beta. There's a demo file showing all the capabilities of html2lrf in the html2lrf sticky thread.

Is this beta available in OSX? Can't find any link to libprs500-beta on the drive.

kovidgoyal
08-26-2007, 01:04 PM
You have to run the normal GUI once before the commandline programs become available.

kovidgoyal
08-26-2007, 01:22 PM
As a general notice, I'm traveling for the next fortnight, so I'm going to have to abandon you guys to the bug swarm.

Adrian
08-26-2007, 05:06 PM
Hmm, try deleting the file ~/library1.db (you will loose any books in the library, if that's a problem, rename it instead).

That did the trick - NYTimes downloads to the Reader perfectly now!

flamaest
08-26-2007, 09:35 PM
I seem to be having minor trouble using the command line.. I have everything connected and the GUI can see the reader ok.

I can LS to the reader OK via the cmd line..

I must be getting something wrong on the CP command:

HELP with my CP command..?

prs500 cp -f Z:\temp6\RSS\*.* "a:/Sony Reader/database/RSS-News/"

kovidgoyal
08-28-2007, 03:30 AM
I seem to be having minor trouble using the command line.. I have everything connected and the GUI can see the reader ok.

I can LS to the reader OK via the cmd line..

I must be getting something wrong on the CP command:

HELP with my CP command..?

prs500 cp -f Z:\temp6\RSS\*.* "a:/Sony Reader/database/RSS-News/"

The CLI doesn't support wildcards and you have to prefix any path that points to the reader with prs500:

flamaest
08-28-2007, 12:48 PM
sorry, I guess I an dense today.. so is this OK?

prs500 cp -f Z:\temp6\RSS\file.txt "prs500 a:/Sony Reader/database/RSS-News/"

Thanks,
F.

kovidgoyal
08-31-2007, 04:34 PM
prs500:a:/blah blah

Nogg
08-31-2007, 05:57 PM
hey kovid,

is it prs500 that prevents you from viewing anything beyond the Data directory, or is it some restriction in the underlying filesystem? I'd like to poke around elsewhere on the device, if possible.

flamaest
08-31-2007, 06:33 PM
prs500:a:/blah blah


Thanks!!!!

igorsk
08-31-2007, 09:48 PM
hey kovid,
is it prs500 that prevents you from viewing anything beyond the Data directory, or is it some restriction in the underlying filesystem? I'd like to poke around elsewhere on the device, if possible.
Only original firmware allowed full access. After the update you can only access /Data and the cards over USB.
Of course, you can use Universal Flasher to look elsewhere :)

Nogg
09-01-2007, 05:20 PM
Hm, interesting.

The flasher script is ok, but I really need to be able to peek into files as well as the directories. I could modify it to kinda do that, but direct access will be better. I think I'll flip back to the original firmware for a bit.

Thanks igorsk!

kovidgoyal
09-02-2007, 01:55 AM
I think there's a check in libprs500 that prevents the user from trying to access locations other than /Data as well. Its just a couple of lines in the code, easy to disable.

FizzyWater
09-04-2007, 12:59 AM
I feel like a total idiot (and should just post a "kick-me" sign on my back for making a statement like that). :rolleyes:

But the very first post in this says to install the libprs500>3.8-something. Yet when I got to the LIBPRS500 wiki webpage, the only one available is the 3.10-whatever that I've already installed.

Is there a secret handshake? I've been reading this forum and searching for keywords all weekend and I've finally decided to admit my ignorance and ask.

Sigh.

Miki

(P.S. Just got my Sony Reader Friday as part of the $50 credit card deal. Up until then, have happily used the ETI eBook conversion software for my eBookwise. When I tried to run html2lrf in the command line, it ran through mostly, but then failed. And since I had no idea how to figure out most of the command line items, I didn't see any point in continuing to mess with it :knife:).

kovidgoyal
09-04-2007, 03:41 AM
0.3.100 > 0.3.99 that's the secret ;-)

And if you're getting errors converting, upgrade to the latest version and if they still persist open a bug report using https://libprs500.kovidgoyal.net/newticket and I'll release a shiny new version just for you ;-)

FizzyWater
09-05-2007, 12:51 AM
0.3.100 > 0.3.99 that's the secret ;-)

Argh. :smack:

See, I was reading it as 1, not 100...and I thought you'd got "up" to 85 or so awfully fast!

Sigh.

Thanks for not giving me a verbal head-slap!

Miki

flamaest
09-05-2007, 02:00 AM
was there a bug mentioned where after you copy many files to the reader, the contents in the libprs500 gui don't seem to update....? even after I restart the libprs500 gui..

i can, however, see the updated content list using the prs500 command line..

i am running libprs500 0.3.106

Thanks,
F.

Ravenflight
09-06-2007, 02:33 PM
I am having several problems with version 0.3.106 under Mac OS 10.4.10.
1. When I click 'Add Books to Library' and select the lrf from the list it doesn't add it, it replaces whatever is number 1. So for example I just added 'Danger!' and it replaced what was on line 1 The Jungle Book. However after it crashes and I reopened it, it then showed both in my library.
2. When I drag a file from the library to the reader libprs500 crashes after transferring the file. (It does show up on the reader though)
3. If I plug in the reader, libprs500 crashes.

kovidgoyal
09-06-2007, 02:38 PM
Use the beta gui you're using the old GUI which has many bugs under OSX. See the first post on how to use the beta gui.

Ravenflight
09-07-2007, 03:20 AM
Ok, that fixed it. I haven't opened a terminal on the Mac in years- This may be a stupid question, but is there a way to make the beta open as the default gui without having to go into terminal each time?

Stingo
09-07-2007, 08:38 AM
Ok, that fixed it. I haven't opened a terminal on the Mac in years- This may be a stupid question, but is there a way to make the beta open as the default gui without having to go into terminal each time?

Try typing in the following applescript program and saving

tell application "Terminal"
activate
do script with command "libprs500-beta"
end tell

Save in your applescript directory and select from drop down menu.

kovidgoyal
09-08-2007, 10:33 AM
Released 0.3.107 which should hopefully be the last release before 0.4.0.

htaylor
09-08-2007, 09:19 PM
A newbie thanks you for telling me where the library was located.
Thanks for your efforts in this project, mostly working great

I get the following error in XP when I try to transfer a converted book to the originating directory.

[Errno 2] No such file or directory: u'C:/My eBooks/Moon, Elizabeth/Moon, Elizabeth - Vatta 03 - Engaging the Enemy\\Moon\\Engaging the Enemy \\libprs500_5.html'
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 472, in save_to_disk
File "libprs500\gui2\library.pyo", line 114, in save_to_disk
File "libprs500\library\database.pyo", line 1026, in export_to_dir
IOError: [Errno 2] No such file or directory: u'C:/My eBooks/Moon, Elizabeth/Moon, Elizabeth - Vatta 03 - Engaging the Enemy\\Moon\\Engaging the Enemy \\libprs500_5.html'

Does the program not like long filenames? or is this feature not operational yet?

A nice addition for me would be that when transferring a converted program back to disk it would automatically open either the previous directory or the originating directory. I put them back where they came from with their new .lrf extension.

kovidgoyal
09-08-2007, 11:42 PM
what version are you using?

Sal2007
09-09-2007, 11:03 AM
Hi,
I get the following error when I try to add a PDF document to my library. It crashes the libprs500. I am running the beta GUI. I am able to download the NY Times - very cool!!

Here is the error:
Traceback (most recent call last):
File "libprs500/gui2/main.pyo", line 262, in add_books
File "libprs500/gui2/main.pyo", line 274, in _add_books
File "libprs500/ebooks/metadata/meta.pyo", line 27, in get_metadata
File "libprs500/ebooks/metadata/pdf.pyo", line 30, in get_metadata
File "libprs500/ebooks/pyPdf/pdf.pyo", line 275, in __init__
File "libprs500/ebooks/pyPdf/pdf.pyo", line 515, in read
File "libprs500/ebooks/pyPdf/generic.pyo", line 64, in readObject
File "libprs500/ebooks/pyPdf/generic.pyo", line 342, in readFromStream
File "libprs500/ebooks/pyPdf/generic.pyo", line 64, in readObject
File "libprs500/ebooks/pyPdf/generic.pyo", line 342, in readFromStream
File "libprs500/ebooks/pyPdf/generic.pyo", line 337, in readFromStream
RuntimeError: maximum recursion depth exceeded

Any suggestions? Thanks.

kovidgoyal
09-09-2007, 11:14 AM
looks like a bug in the pdf metadata reading code. Can you send me the pdf.

Sal2007
09-09-2007, 11:22 AM
There are 2 pdfs attached - they both had the same issues. One is a pdf I created of a web page, the other is one I scanned in from a copier.

kovidgoyal
09-09-2007, 11:42 AM
Hmm an OSX specific bug in the pypdf library. I'll modify libprs500 so it fails to read metadata gracefully in the next release. I've notified the author of pypdf, hopefully he'll have a fix.

Sal2007
09-09-2007, 11:57 AM
Thanks! I look forward to the release. By the way, are you familiar with the script in the Status Q document below? Apparently, it's a way to print web pages from Safari as pdfs directly to libprs500. The script is "book2prs" and is contained at the link below. The script did not work for me though. What do you think?

http://www.statusq.org/archives/2007/02/27/1309/

kovidgoyal
09-09-2007, 01:18 PM
No I dont use OSX. You can try web2lrf as a way of converting websites to LRF files.

htaylor
09-09-2007, 02:38 PM
what version are you using?

Saving books to disk

I was using 03.01.106, I am now trying 1.07

[Error 123] The filename, directory name, or volume label syntax is incorrect: u"C:/My eBooks\\Moon, Elizabeth\\Deed of Paksenarrion The\nSheepfarmer's Daughter"
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 472, in save_to_disk
File "libprs500\gui2\library.pyo", line 114, in save_to_disk
File "libprs500\library\database.pyo", line 1025, in export_to_dir
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: u"C:/My eBooks\\Moon, Elizabeth\\Deed of Paksenarrion The\nSheepfarmer's Daughter"


The title of the book in meta information is; Deed of Paksenarrion The Sheepfarmer's Daughter

It did not make a directory

under this error it make a directory but it is empty

[Errno 2] No such file or directory: u'C:/My eBooks\\Moon, Elizabeth\\Engaging the Enemy \\libprs500_5.html'
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 472, in save_to_disk
File "libprs500\gui2\library.pyo", line 114, in save_to_disk
File "libprs500\library\database.pyo", line 1028, in export_to_dir
IOError: [Errno 2] No such file or directory: u'C:/My eBooks\\Moon, Elizabeth\\Engaging the Enemy \\libprs500_5.html'

Vienna01
09-09-2007, 03:54 PM
When installing libprs500 last msg is to delete sony's win driver. Does this effect Connect? How?
Thanks again for neat program (do they say "neat" anymore?)

kovidgoyal
09-09-2007, 04:00 PM
Yes if you delete the connect driver the connect software wont be able to detect the sony reader

htaylor
09-09-2007, 05:30 PM
version 3.01.107 not the beta, on my XP machine will no longer accept pdf files

RuntimeError: maximum recursion depth exceeded in cmp

problem still there after reboot

kovidgoyal
09-09-2007, 05:36 PM
This is the same problem as reported by Sal2007. Will be fized in the next release.

htaylor
09-09-2007, 05:38 PM
thanks, i did not realize that

htaylor
09-09-2007, 05:46 PM
I think the other problem must be in the original file. Since other than those two files other books are saving OK

htaylor
09-09-2007, 06:44 PM
Interesting---- I changed the names of the two problem files in edit meta information and they both save fine now. I don't know if it was the reboot or changing the names.

kovidgoyal
09-09-2007, 08:52 PM
change them back and see.

htaylor
09-09-2007, 09:08 PM
must have been the reboot, things are saving correctly. I'll try it first next time. The computers are on 24/7

Thanks for your time

iacchi
09-10-2007, 04:10 PM
Version 108, when I try to import a PDF on Win2000 I get this error:


unsupported format character 'w' (0x77) at index 35
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 262, in add_books
File "main.py", line 274, in _add_books
File "libprs500\ebooks\metadata\meta.pyo", line 27, in get_metadata
File "libprs500\ebooks\metadata\pdf.pyo", line 44, in get_metadata
ValueError: unsupported format character 'w' (0x77) at index 35

kovidgoyal
09-10-2007, 04:14 PM
oops typo. fixed in 109 which should reach the servers in about an hour

Vienna01
09-10-2007, 10:17 PM
Yes if you delete the connect driver the connect software wont be able to detect the sony reader

If Sony driver is installed, does that prevent prs500 from connecting to the reader?
If so, Is there some way that I can use both sw packages? (If not, I do understand that project was intended to create a multi-OS & independent tool for access to reader.)

Also:
Using Version 0.3.107-GUI Beta on WinXPSp2-I am able to SAVE in a hierarchical directory with Title folder under Author folder (I set the sort on author). The actual files saved were named prs500_1.lrf and prs500_1.txt. Source book was txt. Is that intended file naming rather than a filename using book name?

THANKS

kovidgoyal
09-10-2007, 10:29 PM
Yeah you cant use the USB access of both packages simultaneously. Windows limitation. And yes the file name are delibrately choose as libprs500_id.ext

JSWolf
09-10-2007, 11:39 PM
If Sony driver is installed, does that prevent prs500 from connecting to the reader?
If so, Is there some way that I can use both sw packages? (If not, I do understand that project was intended to create a multi-OS & independent tool for access to reader.)
Sure there's a way. Install each on a seperate computer.

iacchi
09-11-2007, 05:06 AM
Kovid, do you remember the time format error? (on Debian testing)


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 "build/bdist.linux-i686/egg/libprs500/gui2/library.py", line 507, in sort
File "build/bdist.linux-i686/egg/libprs500/gui2/library.py", line 496, in datecmp
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/books.py", line 47, in __get__
File "build/bdist.linux-i686/egg/libprs500/devices/prs500/books.py", line 66, in
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


I've discovered that it occurs when you plug the reader and when you try to do some operation on it, and not when you try to transfer a PDF. With 109 version it transfer the PDF, though it save it without original metadata but with a "libprs500_2" title and then print out the time format error.
Due to this error (I believe) I can't access reader library. Note that the date is 24 August on the error?

kovidgoyal
09-11-2007, 08:59 AM
What os is this on?

iacchi
09-11-2007, 09:03 AM
Debian testing (lenny)

kovidgoyal
09-11-2007, 09:14 AM
Can you send me the PDF and I'll try to replicate this error.

htaylor
09-11-2007, 05:34 PM
Version 0.3.109 using XP. I imported a pdf file and converted it. I then put it on the reader and tried to bring up the book. the reader crashed and rebooted, I tried it again and it did the same thing. I then put the original back on the beta and sent it to the reader. It went fine but the type is so small it is unreadable to my old eyes. I aso tried it after a reboot, same.

I also saved the file back to my hard drive and the beta could not find it until I unchecked 'read only' in properties.

I am attaching the file

kovidgoyal
09-13-2007, 03:03 PM
Will be fixed in the next release.

Vienna01
09-13-2007, 06:33 PM
Traceback When Attempting To Edit Meta Info


Argument 1 of QLineEdit.setText() has an invalid type
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 389, in edit_metadata
File "libprs500\gui2\dialogs\metadata_single.pyo", line 145, in __init__
TypeError: argument 1 of QLineEdit.setText() has an invalid type

Am I doing something wrong?

kovidgoyal
09-13-2007, 06:51 PM
Nope my fault, will be fixed in the next release.

htaylor
09-14-2007, 02:47 AM
version .107 When I open a command prompt it comes up C:\Documents and settings\hal>

If I open it there the program crashes when I try to add books (libprs500-beta.exe has encountered a problem and needs to close) about 98% of the time. If I open it under just C:\ This does not happen

so If you collect MS error messages you got a few from me. I also sent a case of beer via paypal for this great program--enjoy

kovidgoyal
09-14-2007, 03:02 AM
Thanks, the cash is much appreciated. Hmm...that's a strange error, is there no output in the terminal at all?

htaylor
09-14-2007, 12:54 PM
No output at the terminal.
I am starting to think that the problems are my laptop, not libprs500-beta. It has been doing strange things. I will try to replicate the problems on the desktop.

Ravenflight
09-15-2007, 03:36 AM
Running Version 0.3.109 libprs500-beta
When placing the file 'The Little Prince' (http://www.mobileread.com/forums/attachment.php?attachmentid=5510&d=1189826442) it placed an '&' between the first and last name of the author after it transfered to reader- I tried to change the '&' to a comma on the reader and it crashes (tried 4 times) with the following error-
Traceback (most recent call last):
File "libprs500/gui2/library.pyo", line 624, in setData
File "libprs500/devices/prs500/books.pyo", line 52, in __set__
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128)

kovidgoyal
09-15-2007, 12:06 PM
Will be fixed in next release.

Xenophon
09-15-2007, 06:35 PM
Hey Kovid:

While not perfect, the beta GUI is SO MUCH BETTER than the default GUI... I think it's time to switch. Please make the beta the default, and make the OLD GUI the one that requires the command line.

kovidgoyal
09-15-2007, 06:39 PM
https://libprs500.kovidgoyal.net/roadmap

pwalker8
09-16-2007, 10:41 AM
Kovid,
I just wanted to let you know that I sent a donation via your paypal web link. You are doing a great job. I just wish that Sony was as conscientious about improving their software as you have been.
Thanks!
pww

kovidgoyal
09-16-2007, 12:05 PM
Thanks, much appreciated. In a way, SONY's lack luster performance is what made libprs500 necessary, so I'm not too unhappy with them ;-)

ddavtian
09-16-2007, 11:09 PM
Kovid, I sent some beer money too, through your web page.

I hope these beers do not affect the next release, in few days :-)
Thank you for great tool.

David

kovidgoyal
09-16-2007, 11:15 PM
Thanks, I promise to drink them after 0.4.0 ;-)

ddavtian
09-16-2007, 11:25 PM
Your product manager may have a drink now, good roadmap. Developers deserve drinks too, but after release :-)

Mitchll
09-17-2007, 06:28 PM
Kovid,
Have a six pack on me too. Thanks for wonderful work.

Mitchll

kovidgoyal
09-17-2007, 06:33 PM
Wow at this rate I'll be able to fill the neighborhood pool with beer ;-)

Mitchll
09-18-2007, 07:23 PM
Wow at this rate I'll be able to fill the neighborhood pool with beer ;-)

Hopefully my small contribution will have enabled a premium bath..such as Pilsner Urquell !:beer:

kovidgoyal
09-20-2007, 12:58 AM
0.4.0 is in the wild. The beta GUI is now the default GUI :grin2:

A big thank you to everyone that submitted bug reports and/or donations. This release wouldn't have happened without your support and enthusiasm.

Linux users: If you try to convert more than one document at a time, you may experience crashes. This is due to a bug in PyQt, you have to upgrade SIP and PyQt manually to a development snapshot, or just convert one thing at a time ;-)

StDo
09-21-2007, 02:56 PM
Hello Kovid,

great work!

Shall I send some more beer, or would you prefer some pizza or anything else to eat after the beer in the neighborhood pool... :grin2:


Got this message trying to sort my books in the library (0.4.0 - MacOSX):

no such column: publisher_sort
Detailed traceback:
Traceback (most recent call last):
File "libprs500/gui2/library.pyo", line 151, in sort
File "libprs500/library/database.pyo", line 661, in refresh
OperationalError: no such column: publisher_sort

I just clicked the publisher column.

kovidgoyal
09-21-2007, 02:59 PM
El buggo! Will be fixed in the next release. A nice BBQ lunch would be good, while the warm weather lasts ;-)

StDo
09-21-2007, 03:23 PM
El buggo! Will be fixed in the next release. A nice BBQ lunch would be good, while the warm weather lasts ;-)

The first steak should be there, Kovid. :)
Arrived via Paypal from germany.

kovidgoyal
09-21-2007, 03:30 PM
The first steak should be there, Kovid. :)
Arrived via Paypal from germany.

Much appreciated.

StDo
09-23-2007, 07:32 AM
Hello Kovid,

got the next bug. Will you smash it? See ticket 214.

:)

Just one more question.

Are "Series" as shown in the meta informations of a file in libprs500 the same as "Collections" as shown on the Sony Reader?

If not, how to create "Collections" with an Apple Mac?

StDo
09-23-2007, 07:48 AM
Next question:

In meta informations of a file in the library (libprs500) field "Author(s)":

is it: "Surename,Firstname" or "Firstname,Surename"?

And, if there are two authors, how are they separated?
"Surename,Firstname Surename,Firstname" or "Surename,Firstname;Surename,Firstname"

Any hints?

kovidgoyal
09-23-2007, 12:21 PM
1) Add tags to create collections.

2) In the authors field you should write the entries as the full name like Firstnae Lastname & firstname Last name. If you want the authors to sort as Lastname, Firstname, use the author sort field.

SteffenH
09-23-2007, 01:51 PM
After installing your program there is no connection to my Sony reader, so I can't send my books to the Sony Reader. I did uninstall Connect Reader. But there was no Sony Reader Device Driver to uninstall in my Windows System Software folder. What went wrong?

Than you!

Steffen

kovidgoyal
09-23-2007, 03:46 PM
Follow the instructions at

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

StDo
09-23-2007, 05:09 PM
1) Add tags to create collections.

2) In the authors field you should write the entries as the full name like Firstnae Lastname & firstname Last name. If you want the authors to sort as Lastname, Firstname, use the author sort field.

Hi Kovid,

1)
so it is at the moment impossibe to use the "Series" "Book 4" Fields? They are not used on the PRS?
What is the purpose of these fields?

2)
Is there a comma needed?

kovidgoyal
09-23-2007, 05:22 PM
You can search within the database on those fields. No the comma is not needed the sort field basically sorts starting from the first character.

SteffenH
09-23-2007, 05:41 PM
Thank you! Steffen

ddavtian
09-23-2007, 09:23 PM
Kovid, I get this error when trying to convert pdf documents. From document to document it's the same error message, except the line numbers in the error message. Is this a known problem?

Thanks, David

'NoneType' object has no attribute 'split'
Detailed traceback:
Traceback (most recent call last):
File "main.py", line 539, in convert_single
File "libprs500\gui2\dialogs\lrf_single.pyo", line 68, in __init__
AttributeError: 'NoneType' object has no attribute 'split'

kovidgoyal
09-23-2007, 09:39 PM
No that should not be happening. When you click on the PDF book in the main view what formats are listed for it?

ddavtian
09-23-2007, 10:00 PM
Formats:None
Comments:None
Tags:None

When I try to add a pdf to library, I get the same error and no book is added. I keep adding the same pdf or another one, I always get the same error, only line number is different. Then, randomly, after another error message, all the docs are added to library (right now it took 8 additions until all 8 docs were shown in library, some of them were duplicates because I was adding the same doc). If I try to convert any of them, I get the same error message.

This is not important for me, I only wanted to let you know.
David

kovidgoyal
09-23-2007, 10:07 PM
I can't reproduce this error, which makes me suspect your
database is messed up. Just delete/rename the file library1.db and you should be ok. (You will lose all books in the database)

ddavtian
09-23-2007, 10:32 PM
Thanks for quick replies.
I deleted the db file, opened libprs500, no books in library, tried to add a pdf doc, got the same error again, tried to add three times in a row, finally got the doc in library, repeated 3 times.

I'll wait for the next release, will try later again.

ddavtian
09-30-2007, 03:57 AM
Hi Kovid.
Here are few more error messages that I get when try to add a pdf or lrf (created with pdflrfwin). I have deleted library1.db many times, tried a fresh install, no luck.
These are not blockers for me, I can always move files to device through a card reader, wanted only to let you know (may be it's my machine).

Could not parse XML: not well-formed (invalid token): line 21, column 0
Traceback (most recent call last):
File "main.py", line 265, in add_books
File "main.py", line 277, in _add_books
File "libprs500\ebooks\metadata\meta.pyo", line 25, in get_metadata
File "libprs500\ebooks\lrf\meta.pyo", line 257, in get_metadata
File "libprs500\ebooks\lrf\meta.pyo", line 156, in __get__
File "xml\dom\minidom.pyo", line 1923, in parseString
File "xml\dom\expatbuilder.pyo", line 940, in parseString
File "xml\dom\expatbuilder.pyo", line 223, in parseString
ExpatError: not well-formed (invalid token): line 21, column 0

Traceback (most recent call last):
File "main.py", line 265, in add_books
File "main.py", line 277, in _add_books
File "libprs500\ebooks\metadata\meta.pyo", line 27, in get_metadata
File "libprs500\ebooks\metadata\pdf.pyo", line 31, in get_metadata
File "libprs500\ebooks\pyPdf\pdf.pyo", line 293, in getDocumentInfo
File "libprs500\ebooks\pyPdf\pdf.pyo", line 558, in getObject
Exception: file has not been decrypted

kovidgoyal
09-30-2007, 01:28 PM
Hmm can you send me one pdf and one LRF.

ddavtian
09-30-2007, 01:52 PM
Hmm can you send me one pdf and one LRF.

Sent to your personal address from your home page.
Thanks, David

Vash
09-30-2007, 02:49 PM
Hello,

I'm attempting to upgrade to the latest libprs500 using the install instructions on trac. I'm using ubuntu feisty. Below is the output from the install attempt. It seems that I'm missing some dependency but I cant tell what

Downloading http://pypi.python.org/packages/2.5/l/libprs500/libprs500-0.4.5-py2.5.egg#md5=b214d6743c09fc5508acf46828fc3876
Processing libprs500-0.4.5-py2.5.egg
Moving libprs500-0.4.5-py2.5.egg to /usr/lib/python2.5/site-packages
Removing libprs500 0.3.104 from easy-install.pth file
Adding libprs500 0.4.5 to easy-install.pth file
Installing lrf-meta script to /usr/bin
Installing any2lrf script to /usr/bin
Installing libprs500_postinstall script to /usr/bin
Installing rtf-meta script to /usr/bin
Installing web2lrf script to /usr/bin
Installing lrfviewer script to /usr/bin
Installing pdf2lrf script to /usr/bin
Installing lrf2lrs script to /usr/bin
Installing web2disk script to /usr/bin
Installing html2lrf script to /usr/bin
Installing markdown-libprs500 script to /usr/bin
Installing pdf-meta script to /usr/bin
Installing prs500 script to /usr/bin
Installing txt2lrf script to /usr/bin
Installing lit2lrf script to /usr/bin
Installing rtf2lrf script to /usr/bin
Installing libprs500 script to /usr/bin

Installed /usr/lib/python2.5/site-packages/libprs500-0.4.5-py2.5.egg
Processing dependencies for libprs500
Trying to setup udev rules...
/bin/sh: udevstart: not found
* Reloading kernel event manager... [ OK ]
Setting up bash completion... done
Setting up desktop integration...
/bin/sh: xdg-icon-resource: not found
Traceback (most recent call last):
File "/usr/bin/libprs500_postinstall", line 8, in <module>
load_entry_point('libprs500==0.4.5', 'console_scripts', 'libprs500_postinstall')()
File "build/bdist.linux-i686/egg/libprs500/linux.py", line 200, in post_install
File "build/bdist.linux-i686/egg/libprs500/linux.py", line 261, in setup_desktop_integration
File "/usr/lib/python2.5/subprocess.py", line 461, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'xdg-icon-resource install --context mimetypes --size 128 libprs500-lrf.png application-lrf' returned non-zero exit status 127
Error in sys.excepthook:
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/apport_python_hook.py", line 44, in apport_excepthook
binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
OSError: [Errno 2] No such file or directory

Original exception was:
Traceback (most recent call last):
File "/usr/bin/libprs500_postinstall", line 8, in <module>
load_entry_point('libprs500==0.4.5', 'console_scripts', 'libprs500_postinstall')()
File "build/bdist.linux-i686/egg/libprs500/linux.py", line 200, in post_install
File "build/bdist.linux-i686/egg/libprs500/linux.py", line 261, in setup_desktop_integration
File "/usr/lib/python2.5/subprocess.py", line 461, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'xdg-icon-resource install --context mimetypes --size 128 libprs500-lrf.png application-lrf' returned non-zero exit status 127


I'm hoping someone can help me. I really dont want to boot to windows to load up books any longer:)

kovidgoyal
09-30-2007, 02:50 PM
You can ignore that error. It's related to desktop integration. It will work fine without it.

Vash
09-30-2007, 02:57 PM
You can ignore that error. It's related to desktop integration. It will work fine without it.

cool! Thanks. Now I need to find the proper PyQT4 libs to make adding books work. Eric works well and seems to require the same libs, but I've the the restoreState dependency that I cant find the package that enables it..:(

kovidgoyal
09-30-2007, 03:00 PM
the easiest thing to do is install pyqt from a development snapshot. It's just

python configure.py
make
sudo make install

Vash
09-30-2007, 03:51 PM
the easiest thing to do is install pyqt from a development snapshot. It's just

python configure.py
make
sudo make install


hmm.. somethings breaking... I've installed the latest sip like the package wants but when I attempt to build it I'm getting errors in make

make[1]: Entering directory `/home/vash/Downloads/PyQt-x11-gpl-4.3/QtCore'
g++ -c -pipe -fPIC -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/usr/include/python2.5 -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I/usr/X11R6/include -o sipQtCorecmodule.o sipQtCorecmodule.cpp
sipQtCorecmodule.cpp: In function ‘PyObject* func_qQNaN(PyObject*, PyObject*)’:
sipQtCorecmodule.cpp:8029: error: ‘qQNaN’ was not declared in this scope
sipQtCorecmodule.cpp: In function ‘PyObject* func_qSNaN(PyObject*, PyObject*)’:
sipQtCorecmodule.cpp:8054: error: ‘qSNaN’ was not declared in this scope
sipQtCorecmodule.cpp: In function ‘PyObject* func_qIsNaN(PyObject*, PyObject*)’:
sipQtCorecmodule.cpp:8106: error: ‘qIsNaN’ was not declared in this scope
sip/QtCore/qobject.sip: In function ‘void initQtCore()’:
sip/QtCore/qobject.sip:2943: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[1]: *** [sipQtCorecmodule.o] Error 1
make[1]: Leaving directory `/home/vash/Downloads/PyQt-x11-gpl-4.3/QtCore'
make: *** [all] Error 2


I dont know what it's requesting. Any ideas?

kovidgoyal
09-30-2007, 03:57 PM
Install a development snapshot of SIP first then install a development snapshot of pyqt.

Vash
09-30-2007, 04:02 PM
Install a development snapshot of SIP first then install a development snapshot of pyqt.

I did, got both packages from http://www.riverbankcomputing.co.uk. Sip 4.3.1 installed fine. The PyQT package fails with the above error

kovidgoyal
09-30-2007, 04:05 PM
Install the development snapshot not 4.3.1

Vash
09-30-2007, 04:13 PM
Install the development snapshot not 4.3.1

Do you know where I can download those? On the Riverbank Computing site, the dev snapshots directory only has changelogs in them

kovidgoyal
09-30-2007, 04:22 PM
Hmm looks like Phil pulled the latest snapshots. Check back in a while they should go up again.

EDIT: Actually I just tried building pyqt 4.3.1 and it worked for me. What system are you building this one?

Vash
09-30-2007, 05:09 PM
Hmm looks like Phil pulled the latest snapshots. Check back in a while they should go up again.

EDIT: Actually I just tried building pyqt 4.3.1 and it worked for me. What system are you building this one?

Ubuntu Feisty.

kovidgoyal
09-30-2007, 05:23 PM
Works for me on a feisty system as well. You should post to the pyqt list

Raventhon
10-01-2007, 07:07 PM
When I attempt to transfer files from my computer to the memory card, I receive the following error:

Detailed traceback:
Traceback (most recent call last):
File "main.py", line 419, in sync_to_card
File "main.py", line 442, in sync_to_device
File "libprs500\gui2\library.pyo", line 259, in get_preferred_formats
File "libprs500\library\database.pyo", line 768, in format
MemoryError

When I attempt to transfer files from the base memory on the device to my computer, I receive the following error:

Error: Could not read 4096 bytes on the bulk bus. Error code: -116
Failed to perform job: Copy books from device to disk
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 130, in save_books
File "libprs500\devices\prs500\driver.pyo", line 168, in run_session
File "libprs500\devices\prs500\driver.pyo", line 484, in get_file
File "libprs500\devices\prs500\driver.pyo", line 403, in _bulk_read
File "libprs500\devices\prs500\driver.pyo", line 390, in bulk_read_packet
File "libprs500\devices\libusb.pyo", line 256, in bulk_read
Error: Could not read 4096 bytes on the bulk bus. Error code: -116

What's up? I'm running Windows.

Heck, it won't even let me view a .lrf file with the gui:

Detailed traceback:
Traceback (most recent call last):
File "main.py", line 597, in view_book
File "libprs500\library\database.pyo", line 768, in format
MemoryError

Hm, trying a fresh install that isn't done over top the old install, as that's probably what's making everything FUBAR. :P

Yeah, that seems to have fixed it!

leha
10-01-2007, 08:35 PM
Can somebody explain to me what is the reason for using development snapshot for libprs500? Is there features that absolutely essential for writing a GUI interface?