Closed alphapapa closed 9 years ago
Hmm, sounds like a bash unicode parsing error. The following works fine for me directly from the REPL:
>>> wp.summary("Après")
u'Apr\xe8s is a studio album of mostly French covers by Iggy Pop. It was released on 9 May 2012 on Virgin Records.'
Ok, I finally figured out the problem:
>>> type(sys.argv[1:])
<type 'list'>
>>> type(sys.argv[1:][0])
<type 'str'>
So using, e.g.:
wp.summary(' '.join(sys.argv[1:]))
works.
So I guess one of the functions in the backtrace should either check the datatype or convert its argument to a string, because the exception currently raised gives no clue as to the problem.
e.g.:
Then running
script.py "Après"
fails with: