wikipedista Milda wrote:
> Hi, I have problem described in subject. I'd like to do same complex
> tasks on cs.wikisource documents, and because I can't write scripts in
> Python, I've decided to use pywikipedia framework to download and
> upload pages, whilst working with source wikicode will be made by my
> own specialized scripts written in Perl.
> 


> $ python get.py 'Jaroslav Vrchlický' > file.txt
> Checked for running processes. 1 processes currently running,
> including the current process.
> Traceback (most recent call last):
>   File "get.py", line 33, in <module>
>     main()
>   File "get.py", line 29, in main
>     wikipedia.output(page.get(), toStdout = True)
>   File "/home/milos/wiki/pywikipediabot-new/wikipedia.py", line 668, in get
>     self._contents = self._getEditPage(get_redirect = get_redirect,
> throttle = throttle, sysop = sysop)
>   File "/home/milos/wiki/pywikipediabot-new/wikipedia.py", line 799,
> in _getEditPage
>     raise NoPage(self.site(), self.aslink(forceInterwiki = True))
> wikipedia.NoPage: (wikisource:cs, u'[[cs:Jaroslav Vrchlick\xc3\xbd]]')

I have tried this example on UTF-8 enabled Solaris (with pl_PL.UTF-8 
locale) and it worked for me fine, both stdout and file output.

Can you check what do you get from the following commands?

  python -c 'import sys; print sys.stdout.encoding'

  python -c 'import config; print config.console_encoding'

in case you get something different than UTF-8 and utf-8
you may try adding

console_encoding=UTF-8

at the end of the pywikipedia config.py file.

--Marcin







_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to