This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti, flox
Date 2010-01-12.18:16:08
SpamBayes Score 0.00015044514
Marked as misclassified No
Message-id <1263320170.37.0.237165132806.issue7669@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2010-01-12 18:16:10ezio.melottisetrecipients: + ezio.melotti, flox
2010-01-12 18:16:10ezio.melottisetmessageid: <1263320170.37.0.237165132806.issue7669@psf.upfronthosting.co.za>
2010-01-12 18:16:08ezio.melottilinkissue7669 messages
2010-01-12 18:16:08ezio.melotticreate