Page MenuHomePhabricator

Non-ascii path results in UnicodeDecodeError
Closed, ResolvedPublic

Description

when running recent (13.8.2014) core pywikibot through pwb.py I get this error:

Traceback (most recent call last):

File "pwb.py", line 171, in <module>
  run_python_file(fn, argv, argvu)
File "pwb.py", line 69, in run_python_file
  exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts\login.py", line 116, in <module>
  main()
File "scripts\login.py", line 69, in main
  for arg in pywikibot.handleArgs(*args):
File "C:\Users\JonßÜ\Desktop\Jonas\core\pywikibot\bot.py", line 663, in handleArgs
  init_handlers()
File "C:\Users\JonßÜ\Desktop\Jonas\core\pywikibot\bot.py", line 245, in init_handlers
  writelogheader()
File "C:\Users\JonßÜ\Desktop\Jonas\core\pywikibot\bot.py", line 303, in writelogheader
  log(u'  %(name)s (%(path)s) = %(ver)s' % info)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 12: ordinal not in range(128)
<type 'exceptions.UnicodeDecodeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

the path is "....Users\Jonáš\Desktop....". Using bot placed in ascii-only characters path solves the issue.


Version: core-(2.0)
Severity: major

Details

Reference
bz69476

Related Objects

StatusSubtypeAssignedTask
InvalidNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:43 AM
bzimport set Reference to bz69476.
bzimport added a subscriber: Unknown Object (????).
Wesalius created this task.Aug 13 2014, 3:38 PM

Change 167011 had a related patch set uploaded by John Vandenberg:
Decode file using filesystem encoding

https://gerrit.wikimedia.org/r/167011

Change 167011 merged by jenkins-bot:
Decode file using filesystem encoding

https://gerrit.wikimedia.org/r/167011

Please re-open if there are other problems with using a non-ascii path.