Still no luck. I'm assuming you meant the very last line for that, correct? That failed, but so did every other point in the file.
I'm getting an error about the global names of the functions not being defined.
Here's the output:
Code:
$ calibre-debug -e amazon.py
Rating:
Traceback (most recent call last):
File "/Applications/calibre Beta6.app/Contents/Resources/loaders/calibre-debug.py", line 9, in <module>
main()
File "/Applications/calibre Beta6.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/debug.py", line 158, in main
File "amazon.py", line 50, in <module>
main(args=['', '1416551727', 'AKIAISGM37SF64FSLJEQ'])
File "amazon.py", line 42, in main
print 'Rating:', get_rating(args[1], args[2])
NameError: global name 'get_rating' is not defined
My apologies for my lack of python expertise.