Bugs item #2269688, was opened at 2008-11-12 15:03 Message generated for change (Comment added) made by siebrand You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2269688...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None
Status: Closed
Resolution: Fixed Priority: 5 Private: No Submitted By: Yann Forget (yannforget) Assigned to: Nobody/Anonymous (nobody) Summary: Unicode error with djvutext.py
Initial Comment: on fr.wikisource:
python djvutext.py -index:Livre:Le_Th%C3%A9%C3%A2tre_de_la_R%C3%A9volution._Le_Quatorze_Juillet._Danton._Les_Loups.djvu -djvu:Le_quatorze_juillet_Danton_Les_loups.djvu -pages:375 Checked for running processes. 1 processes currently running, including the current process. Traceback (most recent call last): File "djvutext.py", line 249, in <module> main() File "djvutext.py", line 236, in main wikipedia.output("uploading text from %s to %s" % (djvu, index_page) ) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)
python version.py Pywikipedia [http] trunk/pywikipedia (r6084, Nov 11 2008, 21:51:31) Python 2.5.2 (r252, Sep 13 2008, 22:55:01) [GCC 4.1.2 (Gentoo 4.1.2 p1.1)]
----------------------------------------------------------------------
Comment By: siebrand (siebrand)
Date: 2009-01-27 10:27
Message: Closing this bug.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz) Date: 2008-11-15 14:42
Message: This is unrelated to the current bug.
Please check that console_encoding in your user-config.py is set to the good value. Try quoting properly your arguments : " here are unbalanced. Similarly, escaping ç shouldn't be necessary.
Open a new bug if you cannot find a way to fix this =)
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody) Date: 2008-11-15 12:36
Message: I am also getting a unicode error as follows:
matt@mythtv:~/Desktop/pywikipedia$ python djvutext.py -djvu:Françn.djvu -index:Index:Fran\çois-Millet.djvu" -pages:1-10 Traceback (most recent call last): File "djvutext.py", line 22, in <module> import wikipedia File "/home/matt/Desktop/pywikipedia/wikipedia.py", line 6424, in <module> writeToCommandLogFile() File "/home/matt/Desktop/pywikipedia/wikipedia.py", line 6392, in writeToCommandLogFile args = [decodeArg(modname)] + [decodeArg('"%s"' % s) for s in sys.argv[1:]] File "/home/matt/Desktop/pywikipedia/wikipedia.py", line 6098, in decodeArg return unicode(arg, config.console_encoding) File "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 19-21: invalid data matt@mythtv:~/Desktop/pywikipedia$
----------------------------------------------------------------------
Comment By: Yann Forget (yannforget) Date: 2008-11-15 12:25
Message: r6097 works for me
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz) Date: 2008-11-14 08:00
Message: I went more deeply into that code, intending several fixes. Can you upgrade to the last svn version, and try again ?
I tried with Djvu of E. Dickinson and the script was working. I'd be happy to try with Danton's djvu if necessary :)
----------------------------------------------------------------------
Comment By: Yann Forget (yannforget) Date: 2008-11-13 20:42
Message: I still have the same error. Yann
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz) Date: 2008-11-12 18:41
Message: Au loup !!
This display error should be fixed by r6089. Please re-comment on this bug if it is not the case :)
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2269688...
pywikipedia-l@lists.wikimedia.org