Ezio Melotti <ezio.melo...@gmail.com> added the comment:

This is because in "path = join(os.getcwd(), path)" os.getcwd() returns a 
non-ascii byte string and path is unicode, so the cwd is implicitly decoded 
with the ascii codec in join and the error is raised.
Using getcwdu() when the path is unicode seems to fix the problem:

 def abspath(path):
     """Return an absolute path."""
     if not isabs(path):
-        path = join(os.getcwd(), path)
+        if isinstance(path, unicode):
+            path = join(os.getcwdu(), path)
+        else:
+            path = join(os.getcwd(), path)
     return normpath(path)

----------
nosy: +ezio.melotti

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7669>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to