diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 6e5bd3b567b..dcb8f3a2eb0 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -47,8 +47,8 @@ import logging logger = netsvc.Logger() -_ad = os.path.abspath(opj(tools.config['root_path'], 'addons')) # default addons path (base) -ad_paths= map(lambda m: os.path.abspath(m.strip()),tools.config['addons_path'].split(',')) +_ad = os.path.abspath(opj(tools.ustr(tools.config['root_path']), u'addons')) # default addons path (base) +ad_paths= map(lambda m: os.path.abspath(tools.ustr(m.strip())), tools.config['addons_path'].split(',')) sys.path.insert(1, _ad) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 88f06749f90..390be6b7837 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -262,7 +262,7 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False): return fo if os.path.splitext(name)[1] == '.rml': raise IOError, 'Report %s doesn\'t exist or deleted : ' %str(name) - raise IOError, 'File not found : '+str(name) + raise IOError, 'File not found : %s' % name #----------------------------------------------------------