Problem with os.access with unicode filenames

TheAZN bleh at bleh.com
Mon Aug 11 20:33:10 EDT 2003


The os.access function gives me this error:

"UnicodeEncodeError: 'ascii' codec can't encode character '\ub4' in 
position 31: ordinal not in range(128)"

when I use the os.access function with an Unicode string which contains a 
character u'\u00b4'.

Oddly enough in IDLE: if I do "print u'\ub4'"  I get an error, but it 
doesn't give me an error if I do "print u'\ub00b4'"

Is there a way to get around this?  It works fine when the file name does 
not contain that character.


Wes




More information about the Python-list mailing list