View Full Version : I think I have a PID problem


ccowie
09-12-2009, 03:20 PM
I'm trying really hard to get some Mobi pocket ebooks I unwittingly purchased to work on my prs505. I'm using Python25 and the mobidedrm002.py script (I've also tryed 005).

When I put no quotes around my PID I single quotes around my PID I get an "invalid file" message.

When I put single quotes I get an "invalid PID checksum" message.
I've been working at this for a few days now and can't seem to get anything to work.

I'm wondering if the PID I'm using, which I'm retrieving from within Calibre. I don't own a Kindle so is my PID valid or is that my problem?

wallcraft
09-12-2009, 03:28 PM
How are you reading the MOBI ebooks? If you are using Windows MobiPocket Reader, then your PID is listed under "Reading Devices" (left pane).

AnemicOak
09-12-2009, 03:32 PM
You need whatever PID was encoded into the books when you downloaded them. Can you go back to the retailers site and get it from there? Do you have the Mobi desktop software and do the books work in it? If so they have that PID encoded which you can get in that software by going to Help-->About

There is no need for any kind of quotes around the PID.

ccowie
09-12-2009, 03:53 PM
Yes, I'm reading from the Mobipocket reader on windows and getting the PID from the "reading devices." I can get the PID fine, but I can't get the script to work.

I've heard that the quotes are necessary so I keep trying with and without them.

Any other suggestions?

ccowie
09-12-2009, 04:04 PM
When I remove the quotes I still get the "invalid file" message. The book I'm trying to access is a .prc file, but I know that it's a compilation of several books. I bought a classic book set. Could that have anything to do with my problem?

Leep
09-12-2009, 04:16 PM
You might want to recheck your command line - DOS is very fussy about some characters. An example that should work follows:

mobidedrm002.py "ebook file name.prc" "New ebook filename.prc" PID

Putting the ebook names in quotes should mitigate any character/space issues. Your PID needs to be entered all capital letters, and you should be in the directory where your ebook is located before you type your command line. in example, the DOS command: cd desktop\my ebook will move you to a folder on your desktop called my ebook.

Let us know if you are still having problems

wallcraft
09-12-2009, 04:32 PM
When I remove the quotes I still get the "invalid file" message. The book I'm trying to access is a .prc file, but I know that it's a compilation of several books. I bought a classic book set. Could that have anything to do with my problem? I think you may have an old MOBI ("TEXtREAd") ebook format, see Latest MobiDeDRM Patch (http://www.mobileread.com/forums/showthread.php?p=324075#post324075). It seems that a very few ebooks use this format and are also DRMed. If so (and you can check with a text editor) I don't think there is any known way to strip the DRM.

What is the ebook's title? I may buy a copy just to see such an ancient ebook.

ccowie
09-12-2009, 04:34 PM
When I use single or double quotes around the file name it gives a lengthier message and basically says the file or dir doesn't exist.
I've put the file I'm working on directly into my python25 directory to make things easier.

ccowie
09-12-2009, 04:38 PM
I purchased the 3000 classic books for $20. As you probably know, they then need to be downloaded from the site. I've tried the Dickens and Stoker compilations.

ccowie
09-12-2009, 04:45 PM
How do I check with a text editor? Can I simply open the prc file in notepad?

wallcraft
09-12-2009, 05:10 PM
Can I simply open the prc file in notepad? Yes. Then look near the start for BOOKMOBI or TEXtREAd.

ccowie
09-12-2009, 05:37 PM
I can't see anything understandable when I open the file except for the author name.
I've also discovered that when I use the script it erases all the contents of the prc file.

I'm now getting a "no such file or directory" message.

I'm really appreciative of all the help here. It's really quite frustrating.

ccowie
09-12-2009, 05:41 PM
Sorry about this - I looked again and it does indeed say BOOKMOBI

wallcraft
09-12-2009, 06:44 PM
So far as I can tell mobidedrm should work on these ebooks. I suggest looking in the comments to the dark reverser's weblog for the brand new version 0.0.6. You might also upgrade to python 2.6, but 2.5 is supposed to be ok. In addition these comments might contain links to eBookUtility, which is a GUI wrapper for mobidedrm. You need to edit a text file to make it work without a Kindle.

ccowie
09-13-2009, 10:44 AM
Well thanks for all the help friends, but I still can't seem to get this to work. I've now upgraded to Python 2.6 and have tried several scripts to no avail.

The message I'm getting is "Error: no key found. Maybe the PID is incorrect."

I've tried it with several of the titles I have and I've checked - they are indeed MOBIBOOK.

Any new ideas?

wallcraft
09-13-2009, 11:30 AM
The message I'm getting is "Error: no key found. Maybe the PID is incorrect." I suggest copying the PID to the clipboard (with a right mouse click and select copy) from Windows Desktop Reader and pasting it directly into the command line (right mouse click select paste).

AnemicOak
09-13-2009, 12:32 PM
Are you asked for a user name and password when you open the book in Mobi desktop? IIRC some folks were having a similar problem in another thread on books where that was the case.

ccowie
09-13-2009, 03:08 PM
No. I haven't been prompted for a password.

I've been told the problem is that the file hasn't been initiated with a PID. Unfortunately my problem is that I have no device with which to initialize it. The only reading device I own is a Sony.

If anyone knows of another way to "initialize" the file that would be helpfull.

wallcraft
09-13-2009, 03:41 PM
I've been told the problem is that the file hasn't been initiated with a PID. Unfortunately my problem is that I have no device with which to initialize it. If you are reading it using Windows MobiPocket Reader then it has been initialized. However, make sure you are using the version of the ebook from the MobiPocket ebook directory, which you can find by clicking on "?" icon -> Settings -> Advanced. MobiPocket always copies your ebook to that location, and that is the one that definitely has a PID in it if you can read it.

You can also go to mobipocket.com, select "My Bookself" and then "My Device List". If it has no entries, then add your Windows PC and redownload the ebook. In fact, even if the Windows PID is there I suggest redownloading the ebook anyway. If you bought from some other ebook vendor, then do this, or something similar, at their site (rather than at mobipocket.com).

ccowie
09-14-2009, 12:15 PM
Thanks to all who helped with this.

In the end I uninstalled the mobi reader, redownloaded, reinstalled, redownloaded the book package and it worked. I used the same PID I had been.