[WikiEN-l] Pywikipedia bot : iso --> utf-8

MacGyverMagic/Mgm macgyvermagic at gmail.com
Tue Jun 28 16:24:43 UTC 2005


Since the upgrade yesterday, my python bot code is no longer working
and halts with the following error:

Traceback (most recent call last):
  File "D:\Programmas
Stijn\Python234\Pywikipedia\pywikipedia\login.py", line 164, in
-toplevel-
    main(sys.argv[1:])
  File "D:\Programmas
Stijn\Python234\Pywikipedia\pywikipedia\login.py", line 150, in main
    if not allowedbot(username, ensite):
  File "D:\Programmas
Stijn\Python234\Pywikipedia\pywikipedia\login.py", line 59, in
allowedbot
    text = pl.get()
  File "D:\Programmas
Stijn\Python234\Pywikipedia\pywikipedia\wikipedia.py", line 357, in
get
    self._contents, self._isWatched = getEditPage(self.site(),
self.urlname(), read_only = read_only, get_redirect = get_redirect,
throttle = throttle)
  File "D:\Programmas
Stijn\Python234\Pywikipedia\pywikipedia\wikipedia.py", line 1536, in
getEditPage
    text = getUrl(site, path)
  File "D:\Programmas
Stijn\Python234\Pywikipedia\pywikipedia\wikipedia.py", line 1496, in
getUrl
    site.checkCharset(charset)
  File "D:\Programmas
Stijn\Python234\Pywikipedia\pywikipedia\wikipedia.py", line 2303, in
checkCharset
    raise ValueError("code2encodings has wrong charset for %s. It
should be %s, but is %s"%(repr(self),charset, self.encoding()))
ValueError: code2encodings has wrong charset for wikipedia:en. It
should be utf-8, but is iso-8859-1

I know this is probably too technical for most of the people on this
list, but could some experienced bot owner help me back on track?

--Mgm



More information about the WikiEN-l mailing list