UnicodeEncodeError when importing windows' version of xdg
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Client |
Fix Released
|
High
|
Manuel de la Peña |
Bug Description
Diego Sarmentero has a spanish win xp setup, and when he tried to run the SSO service to run the syncdaemon, he got the following trace:
C:\ubuntuone\
Traceback (most recent call last):
File "ubuntu_
from ubuntu_
File "C:\ubuntuone\
<module>
from ubuntu_sso.account import Account
File "C:\ubuntuone\
le>
from ubuntu_sso.logger import setup_logging
File "C:\ubuntuone\
e>
import xdg.BaseDirectory
File "C:\Python27\
>
app_
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 42:
ordinal not in range(128)
Changed in ubuntuone-client: | |
importance: | Medium → High |
The following line:
xdg_data_dirs = os.environ. get('XDG_ DATA_DIRS' ,
'{0};{1} ;{2}'.format( app_local_ data_path,
app_global_ data_path, app_roaming_ data_path) ).split( ';')
should be replaced with:
xdg_data_dirs = os.environ. get('XDG_ DATA_DIRS' ,
u'{0};{ 1};{2}' .format( app_local_ data_path,
app_global_ data_path, app_roaming_ data_path) ).split( ';')