UnicodeEncodeError when importing windows' version of xdg

Bug #805927 reported by Natalia Bidart
6
This bug affects 1 person
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\ubuntu-sso-client>python ubuntu_sso\qt\tests\show_gui.py
Traceback (most recent call last):
 File "ubuntu_sso\qt\tests\show_gui.py", line 22, in <module>
   from ubuntu_sso.main.windows import UbuntuSSOClient
 File "C:\ubuntuone\ubuntu-sso-client\ubuntu_sso\main\__init__.py", line 27, in
 <module>
   from ubuntu_sso.account import Account
 File "C:\ubuntuone\ubuntu-sso-client\ubuntu_sso\account.py", line 33, in <modu
le>
   from ubuntu_sso.logger import setup_logging
 File "C:\ubuntuone\ubuntu-sso-client\ubuntu_sso\logger.py", line 28, in <modul
e>
   import xdg.BaseDirectory
 File "C:\Python27\lib\site-packages\xdg\BaseDirectory.py", line 91, in <module
>
   app_global_data_path, app_roaming_data_path)).split(';')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 42:
 ordinal not in range(128)

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

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(';')

Changed in ubuntuone-client:
assignee: nobody → Manuel de la Pena (mandel)
importance: Undecided → Medium
status: New → Triaged
tags: added: u1-xdg-windows u1-zomg-windows
Changed in ubuntuone-client:
importance: Medium → High
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

This is now fixed and released in trunk.

Changed in ubuntuone-client:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.