https://bugzilla.wikimedia.org/show_bug.cgi?id=55203
Web browser: --- Bug ID: 55203 Summary: Unicode error on print statment Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1430/ Reported by: Anonymous user Created on: 2012-04-04 15:09:48 Subject: Unicode error on print statment Original description: I'm having an unicode error on print statments, when printing chars like "é", "ê" and similars. It works fine on my lap, and on ts willows, but occours on longruns jobs. The script is a fork of http://code.google.com/p/avbot/source/browse/%5C#svn%2Ftrunk with some minor changes wich has no impact on the print elements. The output for the article [[Política do café com leite]] is:
Unhandled exception in thread started by <function editAnalysis at 0x85b88b4> Traceback (most recent call last): File "/home/alchimista/aleph/avbotanalysis.py", line 681, in editAnalysis [reverted, editData]=mustBeReverted(editData, cleandata, editData['userClass']) File "/home/alchimista/aleph/avbotanalysis.py", line 428, in mustBeReverted return revertAllEditsByUser(editData, userClass, regexplist) #Revert File "/home/alchimista/aleph/avbotanalysis.py", line 250, in revertAllEditsByUser editData=sameOldid(editData) File "/home/alchimista/aleph/avbotanalysis.py", line 113, in sameOldid print 4, editData['pageTitle'], time.time()-t1 UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 3: ordinal not in range(128)
https://bugzilla.wikimedia.org/show_bug.cgi?id=55203
--- Comment #1 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Instead of print use wikipedia.output. It is strongly recommended ofr long-term compatibility that you change "import wikipedia" to "import wikipedia as pywikibot" and use pywikibot.output for any accented text.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55203
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/bugs/1430
https://bugzilla.wikimedia.org/show_bug.cgi?id=55203
Ricordisamoa ricordisamoa@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ricordisamoa@live.it Summary|Unicode error on print |Unicode error on print |statment |statement
https://bugzilla.wikimedia.org/show_bug.cgi?id=55203
--- Comment #2 from Ricordisamoa ricordisamoa@live.it --- WORKSFORME?
https://bugzilla.wikimedia.org/show_bug.cgi?id=55203
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |mpaa.wiki@gmail.com Resolution|--- |WONTFIX
pywikipedia-bugs@lists.wikimedia.org