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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 05-05-2009, 01:06 PM   #1
tuufbiz1
Member
tuufbiz1 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: May 2009
Device: kindle
using python with windows xp

I have activestate python 2.6 installed on my winxp computer. I've successfully obtained a PID using kindlepid.py but am unable to use the mobidedrm.py script since I keep getting the following error message: No such file or directory: 'python'. I enter the info as following: python mobidedrm.py Name-of-book.format Name-of-book.format PID and it doesn't work. How does this program know where to find the ebook file? Is that the problem? I've tried cutting and pasting the ebook file everywhere .... even in the folder where the mobidedrm.py script is located.... but no luck. What am I doing wrong?
tuufbiz1 is offline   Reply With Quote
Advert
Old 05-05-2009, 02:07 PM   #2
AnemicOak
Bookaholic
AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.
 
AnemicOak's Avatar
 
Posts: 13,684
Karma: 50208321
Join Date: Oct 2007
Location: Minnesota
Device: iPad Mini 4, HDX 8.9, AuraHD, NookHD+, Kindle 2,3,T, Opus, iPhone 6, +
Try putting the book in the same folder as the script and not putting 'python' at the beginning of your command string just mobidedrm drmdbook.prc undrmdbook.prc PID (.prc could also be .mobi or .azw). Also make sure you're in the folder where the script is before starting (for example C:\mobi>).



Mods, if this is TMI feel free to delete or edit.



`
AnemicOak is offline   Reply With Quote
Old 05-05-2009, 02:22 PM   #3
tuufbiz1
Member
tuufbiz1 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: May 2009
Device: kindle
different error message now

Quote:
Originally Posted by AnemicOak View Post
Try putting the book in the same folder as the script and not putting 'python' at the beginning of your command string just mobidedrm drmdbook.prc undrmdbook.prc PID (.prc could also be .mobi or .azw). Also make sure you're in the folder where the script is before starting (for example C:\mobi>).



Mods, if this is TMI feel free to delete or edit.



`
I put the ebook file in the same folder as the script file and I omitted the word python in the argument. Now I get a different error message: invalid PID checksum. FYI - when I run kindlepid.py and omit "python" as the first word in the argument --- I get a different PID value??? I also tried using this PID for the mobidedrm.py (also omitting python --- no luck)
tuufbiz1 is offline   Reply With Quote
Old 05-05-2009, 02:42 PM   #4
AnemicOak
Bookaholic
AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.
 
AnemicOak's Avatar
 
Posts: 13,684
Karma: 50208321
Join Date: Oct 2007
Location: Minnesota
Device: iPad Mini 4, HDX 8.9, AuraHD, NookHD+, Kindle 2,3,T, Opus, iPhone 6, +
The 'invalid PID checksum' has come up in other threads

Maybe you can find the solution here...
https://www.mobileread.com/forums/showthread.php?t=26093

Otherwise searching for invalid PID checksum brings up a few other threads too.
AnemicOak is offline   Reply With Quote
Old 05-05-2009, 04:56 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 48,549
Karma: 39003673
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Try uninstalling Active State Python and get Python at http://www.python.org.It is what most people use.

Last edited by JSWolf; 05-05-2009 at 04:58 PM.
JSWolf is offline   Reply With Quote
Advert
Old 05-05-2009, 04:56 PM   #6
BinaryTB
Connoisseur
BinaryTB is on a distinguished road
 
BinaryTB's Avatar
 
Posts: 73
Karma: 74
Join Date: Mar 2009
Location: Boston, MA
Device: Kindle 3
If everything else fails, try the Python from python.org (what most people use), not ActiveState.
BinaryTB is offline   Reply With Quote
Old 05-05-2009, 05:19 PM   #7
Leep
Guru
Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.Leep ought to be getting tired of karma fortunes by now.
 
Leep's Avatar
 
Posts: 739
Karma: 1018859
Join Date: Jun 2008
Location: Near Seattle
Device: kindle1, K3, K3G (thanks MR), iTouch, Kindle Touch
Most likely your problem is either your command line or you have not gotten a valid PID. When you run KindlePID, make sure that all the alphas are input as capital letters, leave out any spaces and 0 are numerics (zero).

Then put your python script in the same folder as your ebook. Open a command prompt window and change directory to that folder. i.e. cd desktop\ebooks When you see confirmation that you are in the correct folder, your input line should be mobidedrm.py ebookname.azw newebookname.prc PID If the ebook name or new ebook name have any spaces in it, enclose the name in " " i.e mobidedrm.py "ebook name.azw" "new ebook name.prc" PID.

Let us know if you still have problems. I am using activestate Python for all my python scripts with no issues.

cheers
Lee
Leep is offline   Reply With Quote
Old 05-05-2009, 05:44 PM   #8
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Leep's post should be enough to get you going. If not, try argecho.py and pid_checksum.py. Note that if pid_checksum reports a bad PID, it has most likely been typed in wrong (e.g. 0 or O or 1 for I).
wallcraft is offline   Reply With Quote
Old 05-05-2009, 11:27 PM   #9
tuufbiz1
Member
tuufbiz1 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: May 2009
Device: kindle
still no luck

Quote:
Originally Posted by Leep View Post
Most likely your problem is either your command line or you have not gotten a valid PID. When you run KindlePID, make sure that all the alphas are input as capital letters, leave out any spaces and 0 are numerics (zero).

Then put your python script in the same folder as your ebook. Open a command prompt window and change directory to that folder. i.e. cd desktop\ebooks When you see confirmation that you are in the correct folder, your input line should be mobidedrm.py ebookname.azw newebookname.prc PID If the ebook name or new ebook name have any spaces in it, enclose the name in " " i.e mobidedrm.py "ebook name.azw" "new ebook name.prc" PID.

Let us know if you still have problems. I am using activestate Python for all my python scripts with no issues.

cheers
Lee
Thank you very much for your help but it still doesn't work. I placed the ebook in same folder as the mobidedrm.py folder and I changed the directory to this folder. Again, the kindlepid.py ran fine (although it gave me a different value than when I ran it within the active python interface). When I run the mobidedrm.py ebook.azw ebook.mobi PID I get the following message: [Errno 2] No such file or directory: 'ebook.azw'
tuufbiz1 is offline   Reply With Quote
Old 05-05-2009, 11:42 PM   #10
tuufbiz1
Member
tuufbiz1 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: May 2009
Device: kindle
Quote:
Originally Posted by tuufbiz1 View Post
Thank you very much for your help but it still doesn't work. I placed the ebook in same folder as the mobidedrm.py folder and I changed the directory to this folder. Again, the kindlepid.py ran fine (although it gave me a different value than when I ran it within the active python interface). When I run the mobidedrm.py ebook.azw ebook.mobi PID I get the following message: [Errno 2] No such file or directory: 'ebook.azw'

I just tried to redownload the mobidedrm.zip file and extract the files again.
When I run the kindlepid.py I get the same result but when I run mobidedrm.py I get a new error message: error: invalid encryption type: 0
tuufbiz1 is offline   Reply With Quote
Old 05-05-2009, 11:53 PM   #11
tuufbiz1
Member
tuufbiz1 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: May 2009
Device: kindle
Quote:
Originally Posted by tuufbiz1 View Post
I just tried to redownload the mobidedrm.zip file and extract the files again.
When I run the kindlepid.py I get the same result but when I run mobidedrm.py I get a new error message: error: invalid encryption type: 0

IT WORKS!!!!!!!!!! THANK YOU SO MUCH!!!!!!!
I redownloaded the mobidedrm.zip file and extracted the files and ran everything through the command prompt and it works! I got a different PID when I ran it from with activestate python.
tuufbiz1 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use python script with windows xp tuufbiz1 Other formats 12 01-08-2011 08:22 AM
Python error! didiyy Calibre 6 09-24-2010 02:05 AM
Python 261 In Windows Problems jwsheets Kindle Formats 3 08-14-2009 09:08 AM
GUI Frontend for python scripts [windows] - seeking mod input first sherman Workshop 7 04-27-2009 01:04 AM
Python 2.5 or 2.6? itimpi Calibre 5 01-19-2009 12:48 PM


All times are GMT -4. The time now is 02:50 AM.


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