[Pywikipedia-bugs] [ pywikipediabot-Bugs-3428890 ] Using non-ascii file path causes UnicodeDecodeError

SourceForge.net noreply at sourceforge.net
Sat Oct 29 12:36:46 UTC 2011


Bugs item #3428890, was opened at 2011-10-26 22:35
Message generated for change (Comment added) made by xqt
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3428890&group_id=93107

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: confirmed
Status: Open
Resolution: None
Priority: 3
Private: No
Submitted By: Merlijn S. van Deen (valhallasw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Using non-ascii file path causes UnicodeDecodeError

Initial Comment:
[user at denix eskarcha]$ python2 login.py
unicode test: triggers problem #3081100
Password for user Eskarcha on chakra:en: 
Logging in to chakra:en as Eskarcha via API.
Traceback (most recent call last):
  File "login.py", line 436, in <module>
    main()
  File "login.py", line 432, in main
    loginMan.login()
  File "login.py", line 319, in login
    cookiedata = self.getCookie(api)
  File "login.py", line 243, in getCookie
    self.site.updateCookies(L, self.sysop)
  File "/home/user/proxectos/chakra/documentación/eskarcha/wikipedia.py", line 5193, in updateCookies
    self._setupCookies(self._cookies[index], sysop)
  File "/home/user/proxectos/chakra/documentación/eskarcha/wikipedia.py", line 5164, in _setupCookies
    f = open(config.datafilepath('login-data', filename), 'w')
  File "/home/user/proxectos/chakra/documentación/eskarcha/config.py", line 505, in datafilepath
    return makepath(os.path.join(base_dir, *filename))
  File "/usr/lib/python2.7/posixpath.py", line 71, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 39: ordinal not in range(128)

[user at denix eskarcha]$ python2 version.py
Pywikipedia [http] trunk/pywikipedia (r9675, 2011/10/26, 08:57:14)
Python 2.7.1 (r271:86832, Jul 24 2011, 00:49:56) 
[GCC 4.5.3]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100

Moving the pywikipediabot directory to an ascii path works as workaround.

----------------------------------------------------------------------

>Comment By: xqt (xqt)
Date: 2011-10-29 14:36

Message:
Looks like a python bug and not ours

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3428890&group_id=93107



More information about the Pywikipedia-bugs mailing list