Last modified: 2013-12-17 12:02:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57230, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55230 - Using non-ascii file path causes UnicodeDecodeError
Using non-ascii file path causes UnicodeDecodeError
Status: RESOLVED DUPLICATE of bug 55131
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:47 UTC by Kunal Mehta (Legoktm)
Modified: 2013-12-17 12:02 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:47:25 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1370/
Reported by: valhallasw
Created on: 2011-10-26 20:35:33
Subject: Using non-ascii file path causes UnicodeDecodeError
Original description:
\[user@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@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 1 Kunal Mehta (Legoktm) 2013-10-05 04:47:27 UTC
Looks like a python bug and not ours
Comment 2 Kunal Mehta (Legoktm) 2013-10-05 04:47:29 UTC
same as https://sourceforge.net/p/pywikipediabot/bugs/1648/
Comment 3 xqt 2013-12-17 12:02:36 UTC

*** This bug has been marked as a duplicate of bug 55131 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links