Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 01-03-2009, 12:41 PM   #1
greyparrot
eBook enthusiast
greyparrot began at the beginning.
 
greyparrot's Avatar
 
Posts: 49
Karma: 17
Join Date: Dec 2007
Location: Tampa, FL
Device: Kindle DX/Kindle 2/Sony PRS-505
I have a problem with Igor's kindlefix.py

I'm trying to get Igor's script working. I have followed 'Wiki Visual Kindle Guide' to the letter and have kindlepid working and have my Kindle PID, but I cannot get kindlefix working. I downloaded 'Natural-583.prc' from
booksonboard.com in (OD) format and ran kindlefix but get this message.

The Kindleizer v0.1. Copyright (c) 2007 Igor Skochinsky
Encryption: 2
Mobi publication type: 2
Mobi format version: 4
Traceback (most recent call last):
File "/users/greyparrot/ebooktools/kindlefix.py", line 157, in ?
sys.exit(main(fname, sys.argv[2]))
File "/users/greyparrot/ebooktools/kindlefix.py", line 134, in main
new_rec0 = find_key(rec0, pid)
File "/users/greyparrot/ebooktools/kindlefix.py", line 68, in find_key
temp_key = PC1(keyvec1, pid.ljust(16,'\0'), False)
TypeError: ljust() takes exactly 1 argument (2 given)

What is the problem?
greyparrot is offline   Reply With Quote
Old 01-03-2009, 01:03 PM   #2
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by greyparrot View Post
I'm trying to get Igor's script working. I have followed 'Wiki Visual Kindle Guide' to the letter and have kindlepid working and have my Kindle PID, but I cannot get kindlefix working. I downloaded 'Natural-583.prc' from
booksonboard.com in (OD) format and ran kindlefix but get this message.

The Kindleizer v0.1. Copyright (c) 2007 Igor Skochinsky
Encryption: 2
Mobi publication type: 2
Mobi format version: 4
Traceback (most recent call last):
File "/users/greyparrot/ebooktools/kindlefix.py", line 157, in ?
sys.exit(main(fname, sys.argv[2]))
File "/users/greyparrot/ebooktools/kindlefix.py", line 134, in main
new_rec0 = find_key(rec0, pid)
File "/users/greyparrot/ebooktools/kindlefix.py", line 68, in find_key
temp_key = PC1(keyvec1, pid.ljust(16,'\0'), False)
TypeError: ljust() takes exactly 1 argument (2 given)

What is the problem?
It looks like your command line is the problem. What OS are you using? Can you show us the command line you used?

Also, you did put your KindlePID into the BoB bookstore BEFORE you downloaded this file right?

BOb
pilotbob is offline   Reply With Quote
Old 01-03-2009, 06:09 PM   #3
greyparrot
eBook enthusiast
greyparrot began at the beginning.
 
greyparrot's Avatar
 
Posts: 49
Karma: 17
Join Date: Dec 2007
Location: Tampa, FL
Device: Kindle DX/Kindle 2/Sony PRS-505
I have a problem with Igor's kindlefix.py

Quote:
Originally Posted by pilotbob View Post
What OS are you using? Can you show us the command line you used?
Also, you did put your KindlePID into the BoB bookstore BEFORE you downloaded this file right?
BOb
Hi, Fellow Tampa Floridian

Mac OS X 10.4.11
Python 2.4.3
Yes, I did add my Kindle PID on BooksOnBoard before downloading the book.

grey parrot-powerbook-g4-15:~/downloads greyparrot $ /users/greyparrot/ebooktools/kindlefix.py Natural-583.prc <myKindlePID>
/users/greyparrot/ebooktools/kindlefix.py:61: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up
if off1==0xFFFFFFFF or off1==0:
The Kindleizer v0.1. Copyright (c) 2007 Igor Skochinsky
Encryption: 2
Mobi publication type: 2
Mobi format version: 4
Traceback (most recent call last):
File "/users/greyparrot/ebooktools/kindlefix.py", line 157, in ?
sys.exit(main(fname, sys.argv[2]))
File "/users/greyparrot/ebooktools/kindlefix.py", line 134, in main
new_rec0 = find_key(rec0, pid)
File "/users/greyparrot/ebooktools/kindlefix.py", line 68, in find_key
temp_key = PC1(keyvec1, pid.ljust(16,'\0'), False)
TypeError: ljust() takes exactly 1 argument (2 given)
greyparrot is offline   Reply With Quote
Old 01-03-2009, 06:27 PM   #4
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by greyparrot View Post
Hi, Fellow Tampa Floridian

Mac OS X 10.4.11
Python 2.4.3
Yes, I did add my Kindle PID on BooksOnBoard before downloading the book.
Ok, since you are Mac OSx you are surrounding the PID with single quotes on the command line?

BOb
pilotbob is offline   Reply With Quote
Old 01-04-2009, 06:58 AM   #5
greyparrot
eBook enthusiast
greyparrot began at the beginning.
 
greyparrot's Avatar
 
Posts: 49
Karma: 17
Join Date: Dec 2007
Location: Tampa, FL
Device: Kindle DX/Kindle 2/Sony PRS-505
Quote:
Originally Posted by pilotbob View Post
Ok, since you are Mac OSx you are surrounding the PID with single quotes on the command line?

BOb
No I wasn't but I just tried it with single quotes and got the same error message. I had a BOB account and added the KindlePID to it, I wonder if the fact that other PID's are listed on BOB that could cause a problem. BOB will only let me delete one pid in 24 hours and I have three listed so I opened a new account with only the kindle pid. Nothing changed I still get the same error message.

Last edited by greyparrot; 01-04-2009 at 07:26 AM. Reason: added info
greyparrot is offline   Reply With Quote
Old 01-04-2009, 10:00 AM   #6
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
Try taking the - out of the name of the book

cheers
Leep is offline   Reply With Quote
Old 01-04-2009, 11:46 AM   #7
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
From Paul Durrant in Simple guide to installing Python:
Quote:
The error

TypeError: ljust() takes exactly 1 argument (2 given)

means that your version of Python is too old for this script. I think it was in Python 2.4 that the second argument was added to ljust().
wallcraft is offline   Reply With Quote
Old 01-04-2009, 12:45 PM   #8
greyparrot
eBook enthusiast
greyparrot began at the beginning.
 
greyparrot's Avatar
 
Posts: 49
Karma: 17
Join Date: Dec 2007
Location: Tampa, FL
Device: Kindle DX/Kindle 2/Sony PRS-505
I have a problem with Igor's kindlefix.py

Quote:
Originally Posted by Leep View Post
Try taking the - out of the name of the book
Quote:
Originally Posted by wallcraft View Post
From Paul Durrant in Simple guide to installing Python:
Leep, I have the same problem with or without the '-' in the file name.

wallcraft, I have Python 2.4.3, is a newer version available for Mac OS X Tiger.
greyparrot is offline   Reply With Quote
Old 01-04-2009, 01:07 PM   #9
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
Quote:
Originally Posted by greyparrot View Post
I have Python 2.4.3, is a newer version available for Mac OS X Tiger.
Version 2.4 is supposed to allow 2 arguments. From Highlights: Python 2.4:
Quote:
string methods - strings gained an rsplit() method, and the string methods ljust(), rjust() and center() accept an argument to specify the fill character.
I'm not an expert on Python or the Mac, but see Python on the Mac. The download page for OSX 10.4 isn't very clear about what to download though.
wallcraft is offline   Reply With Quote
Old 01-04-2009, 01:13 PM   #10
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by greyparrot View Post
wallcraft, I have Python 2.4.3, is a newer version available for Mac OS X Tiger.
You should probably update to the latest version of 2.5.

http://www.python.org/download/mac/

Although, I thought Deb ran this on Tiger with 2.4 and it worked. But, I'm not a python guru.

You could also try ActivePython... which I think is just a single universal binary. http://www.activestate.com/activepython/

BOb
pilotbob is offline   Reply With Quote
Old 01-04-2009, 05:51 PM   #11
greyparrot
eBook enthusiast
greyparrot began at the beginning.
 
greyparrot's Avatar
 
Posts: 49
Karma: 17
Join Date: Dec 2007
Location: Tampa, FL
Device: Kindle DX/Kindle 2/Sony PRS-505
I have a problem with Igor's kindlefix.py

Quote:
Originally Posted by pilotbob View Post
You should probably update to the latest version of 2.5.BOb
I installed Python 2.6.1 and still have the same problem. I'm about to give up on this. BOB probably doesn't have anything that Amazon doesn't have and Amazon prices are lower. I'll keep watching this and other forums and some day I might find a solution.
greyparrot is offline   Reply With Quote
Old 01-04-2009, 06:13 PM   #12
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
Quote:
Originally Posted by greyparrot View Post
I installed Python 2.6.1 and still have the same problem.
I don't think it is possible for 2.6.1 to give this particular error. Perhaps /usr/bin/python is still pointing to the old version. I don't have a Mac, but (assuming it is like Linux) try in the Terminal window:
Code:
post content modified on Amazon's request
The which python command should tell you where python is located. If it is not /usr/bin/python, then the top line of the script may need changing (or invoke python explicitly as demonstrated by the 2nd and 3rd line above). A stand-alone python command opens up the python interpreter and the 1st line of output should tell you which version. Use quit() to exit. If the version is 2.6.1, then try the full python command line (with your ebook and PID), but first make sure that kindlefix.py is in the current directory (with the ebook). If the python version isn't 2.6.1, then your command path probably needs changing. I don't know enough about the Mac to help with this.
wallcraft is offline   Reply With Quote
Old 01-04-2009, 06:28 PM   #13
lisreed
Addict
lisreed is no ebook tyro.lisreed is no ebook tyro.lisreed is no ebook tyro.lisreed is no ebook tyro.lisreed is no ebook tyro.lisreed is no ebook tyro.lisreed is no ebook tyro.lisreed is no ebook tyro.lisreed is no ebook tyro.lisreed is no ebook tyro.
 
lisreed's Avatar
 
Posts: 281
Karma: 1301
Join Date: Jul 2008
Location: Upstate NY
Device: Nook GlowLight 3
I think its because you bought the book at books on board. The mobipocket server rejects kindle pids.
lisreed is offline   Reply With Quote
Old 01-04-2009, 06:30 PM   #14
pilotbob
Grand Sorcerer
pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.pilotbob ought to be getting tired of karma fortunes by now.
 
pilotbob's Avatar
 
Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
Quote:
Originally Posted by greyparrot View Post
I installed Python 2.6.1 and still have the same problem. I'm about to give up on this. BOB probably doesn't have anything that Amazon doesn't have and Amazon prices are lower. I'll keep watching this and other forums and some day I might find a solution.
Yea, this really isn't needed to buy books. But, for library books and such that is really what it is for. Amazons prices/selection usually as good as or better than BoB.

Ok...

1. Are you sure you used python 2.6? Type python --version at the command line and see what it returns. If 2.4 is in your path first that will be used.

2. You could try mobidedrm instead.

BOb
pilotbob is offline   Reply With Quote
Old 01-05-2009, 06:58 AM   #15
greyparrot
eBook enthusiast
greyparrot began at the beginning.
 
greyparrot's Avatar
 
Posts: 49
Karma: 17
Join Date: Dec 2007
Location: Tampa, FL
Device: Kindle DX/Kindle 2/Sony PRS-505
Quote:
Originally Posted by pilotbob View Post
Yea, this really isn't needed to buy books. But, for library books and such that is really what it is for. Amazons prices/selection usually as good as or better than BoB.

Ok...

1. Are you sure you used python 2.6? Type python --version at the command line and see what it returns. If 2.4 is in your path first that will be used.

2. You could try mobidedrm instead.

BOb
I agree about BOB and Amazon.

1. Terminal returns Python 2.6.1
It's available at http://www.python.org/download/releases/2.6.1/

2. I'm not interested in removing DRM. My reason for pursuing this was for the rare case when a book was not available on Amazon and was on BOB.
greyparrot is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacks kindlepid/kindlefix 0.2 igorsk Amazon Kindle 162 01-30-2010 11:40 AM
Kindlefix no longer working for library books! NedScharpf Amazon Kindle 4 09-04-2009 09:54 AM
How to make Igor's script work sunshine6855 Kindle Developer's Corner 160 03-12-2009 09:54 AM
KindlePID and KindleFIX on Kindle 2 daffy4u Amazon Kindle 22 02-24-2009 03:11 PM
My problem with kindlefix taltman711 Kindle Developer's Corner 6 05-09-2008 09:36 AM


All times are GMT -4. The time now is 07:58 AM.


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