Hello, maybe somebody could help to solve a strange interwiki bot bug.
Now I often get it when bot is checking articles with some letters with diacritics, as in example bellow it stops when it founds Spanish letter í. It also hapens with some Hungarian, Finnish letters. The most strange thing is that on another computer with the same OS, the same Python version and the same pywikipedia version everything works perfectly.
C:\Python26\pywikipedia>interwiki.py Kategorija:Lietuvos archeologija Getting 1 pages from wikipedia:lt... [[Kategorija:Lietuvos archeologija]]: [[lt:Kategorija:Lietuvos archeologija]] gi ves new interwiki [[en:Category:Archaeology of Lithuania]] Getting 1 pages from wikipedia:en... [[Kategorija:Lietuvos archeologija]]: [[en:Category:Archaeology of Lithuania]] g ives new interwiki [[es:CategorDump lt (wikipedia) saved Traceback (most recent call last): File "C:\Python26\pywikipedia\interwiki.py", line 2186, in <module> bot.run() File "C:\Python26\pywikipedia\interwiki.py", line 1888, in run self.queryStep() File "C:\Python26\pywikipedia\interwiki.py", line 1861, in queryStep self.oneQuery() File "C:\Python26\pywikipedia\interwiki.py", line 1857, in oneQuery subject.batchLoaded(self) File "C:\Python26\pywikipedia\interwiki.py", line 1210, in batchLoaded wikipedia.output(u"%s: %s gives new interwiki %s"% (self.originPage.aslink() , page.aslink(True), linkedPage.aslink(True))) File "C:\Python26\pywikipedia\wikipedia.py", line 7421, in output ui.output(text, toStdout = toStdout) File "C:\Python26\pywikipedia\userinterfaces\terminal_interface.py", line 221, in output self.printColorized(text, targetStream) File "C:\Python26\pywikipedia\userinterfaces\terminal_interface.py", line 174, in printColorized self.printColorizedInWindows(text, targetStream) File "C:\Python26\pywikipedia\userinterfaces\terminal_interface.py", line 156, in printColorizedInWindows targetStream.write(text.encode(config.console_encoding, 'replace')) IOError: [Errno 42] Illegal byte sequence
Sarunas (User:Hugo.arg)
2009/10/19 Dies Irae umbraeinsilva@gmail.com:
Hello, maybe somebody could help to solve a strange interwiki bot bug.
Now I often get it when bot is checking articles with some letters with diacritics, as in example bellow it stops when it founds Spanish letter í. It also hapens with some Hungarian, Finnish letters. The most strange thing is that on another computer with the same OS, the same Python version and the same pywikipedia version everything works perfectly.
Out of curiosity, what windows version is this? I'm pretty sure that the terminal encoding is different between them. Do you use the same language on both OS for example? I know for a fact that Japanese Windows XP ship with a different default encoding than Western European XPs. What value do you use as encoding in user-config.py? Have you tried tweaking it?
I use WinXP usual English version on both. Now I fixed the problem inserting console_encoding = 'cp1257' so everything works properly. Only its interesting that before everything worked well without any encodings but when I have updated my python and pywikipedia software that problem began.
2009/10/19 Nicolas Dumazet nicdumz@gmail.com
2009/10/19 Dies Irae umbraeinsilva@gmail.com:
Hello, maybe somebody could help to solve a strange interwiki bot bug.
Now I often get it when bot is checking articles with some letters with diacritics, as in example bellow it stops when it founds Spanish letter
í.
It also hapens with some Hungarian, Finnish letters. The most strange
thing
is that on another computer with the same OS, the same Python version and the same pywikipedia version everything works perfectly.
Out of curiosity, what windows version is this? I'm pretty sure that the terminal encoding is different between them. Do you use the same language on both OS for example? I know for a fact that Japanese Windows XP ship with a different default encoding than Western European XPs. What value do you use as encoding in user-config.py? Have you tried tweaking it?
-- Nicolas Dumazet — NicDumZ
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I have two computers, one with python 2.5 and one with python 2.6. On 2.5 I have no problem with encoding, on 2.6 encoding works OK only from commandline, not from terminal window. Maybe is problem here?
JAnD
2009/10/20 Dies Irae umbraeinsilva@gmail.com:
I use WinXP usual English version on both. Now I fixed the problem inserting console_encoding = 'cp1257' so everything works properly. Only its interesting that before everything worked well without any encodings but when I have updated my python and pywikipedia software that problem began.
2009/10/19 Nicolas Dumazet nicdumz@gmail.com
2009/10/19 Dies Irae umbraeinsilva@gmail.com:
Hello, maybe somebody could help to solve a strange interwiki bot bug.
Now I often get it when bot is checking articles with some letters with diacritics, as in example bellow it stops when it founds Spanish letter í. It also hapens with some Hungarian, Finnish letters. The most strange thing is that on another computer with the same OS, the same Python version and the same pywikipedia version everything works perfectly.
Out of curiosity, what windows version is this? I'm pretty sure that the terminal encoding is different between them. Do you use the same language on both OS for example? I know for a fact that Japanese Windows XP ship with a different default encoding than Western European XPs. What value do you use as encoding in user-config.py? Have you tried tweaking it?
-- Nicolas Dumazet — NicDumZ
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
2009/10/20 Jan Dudík jan.dudik@gmail.com:
I have two computers, one with python 2.5 and one with python 2.6. On 2.5 I have no problem with encoding, on 2.6 encoding works OK only from commandline, not from terminal window. Maybe is problem here?
Sorry, what's different between "commandline" and terminal window under XP? What is "commandline" if not the system terminal? I'm confused.