Feature Requests item #3602107, was opened at 2013-01-25 06:38 Message generated for change (Comment added) made by n-fran You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3602107...
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: Open Resolution: None Priority: 5 Private: No Submitted By: Анима (n-fran) Assigned to: Nobody/Anonymous (nobody) Summary: standardize_notes.py encoding
Initial Comment: If I want to add to the script text of russian letters, is this error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
To avoid this error, I think, it is necessary to register in the code bot these or any of the other lines:
# -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8')
And my bot started to function. Thanks.
----------------------------------------------------------------------
Comment By: Анима (n-fran)
Date: 2013-01-25 09:23
Message: Sorry, my knowledge of the English language, particularly on the part of the technical terms, it may be bad. I meant that I was putting in Russian characters in the file standardize_notes.py . For example, I changed the '\n== Notes ==\n' to '\n== Примечания ==\n' (line 987), and then this error appeared:
When I added in the beginning of the text file, which is pointed out above, the problem disappeared. Thank you.
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2013-01-25 07:38
Message: I cannot follow what you mean with "add to the script". Do you want to modify the script or enter russian characters on the command line?
What is the complete error you got.
Did you set your transliteration_target and console_encoding in your user-config.py
reload(sys) after import sys does not matter since it just reloads the same module
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603141&aid=3602107...
pywikipedia-bugs@lists.wikimedia.org