Project

General

Profile

Anomalie #6524

Problème d’encodage sur la levée d’une exception

Added by Daniel Dehennin over 7 years ago. Updated over 7 years ago.

Status:
Fermé
Priority:
Haut
Category:
-
Start date:
Due date:
% Done:

100%

Spent time:
Distribution:
EOLE 2.4

Description

Sur un module sphynx:

2013-10-31 11:18:04,551: eolegenconfig - 'ascii' codec can't encode character u'\xe9' in position 3: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/views.py", line 233, in modes
    return make_json_response(lib.get_modes(id_))
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 150, in get_modes
    config = get_config(id_)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 75, in get_config
    config = creole_loader(rw=True, owner='gen_config', reload_config=False, force_configeol=force_configfile)
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 197, in creole_loader
    loader.read_dir(dirs, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/var_loader.py", line 838, in read_dir
    self._populate(parse, namespace, level)
  File "/usr/lib/python2.7/dist-packages/creole/var_loader.py", line 869, in _populate
    raise ConfigError("Unable to populate {0}: {1}".format(keys, err.message))

J’ai ajouté un u au message:

raise ConfigError(u"Unable to populate {0}: {1}".format(keys, err.message))

Maintenant l’exception se propage jusqu’à genconfig:

2013-10-31 11:25:12,714: eolegenconfig - Unable to populate families: Redéfinition de l'attribut multi interdit pour la variable vip_resource_name
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/views.py", line 233, in modes
    return make_json_response(lib.get_modes(id_))
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 150, in get_modes
    config = get_config(id_)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 75, in get_config
    config = creole_loader(rw=True, owner='gen_config', reload_config=False, force_configeol=force_configfile)
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 197, in creole_loader
    loader.read_dir(dirs, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/var_loader.py", line 838, in read_dir
    self._populate(parse, namespace, level)
  File "/usr/lib/python2.7/dist-packages/creole/var_loader.py", line 869, in _populate
    raise ConfigError(u"Unable to populate {0}: {1}".format(keys, err.message))
ConfigError: Unable to populate families: Red\xe9finition de l'attribut multi interdit pour la variable vip_resource_name
2013-10-31 11:25:12,715: eolegenconfig - Exception on /modes [GET]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1504, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1264, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1262, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1248, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python2.7/dist-packages/eoleauthlib/authclient.py", line 145, in decorated_function
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/views.py", line 236, in modes
    return make_error_response(str(err))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 32: ordinal not in range(128)

Related issues

Related to creole - Anomalie #6523: Problème d’encodage sur la levée d’une exception Classée sans suite
Related to eole-pacemaker - Anomalie #6894: variable vip_resource_name utilisé si activer_haute_dispo est à esclave Fermé

History

#1 Updated by Joël Cuissinat over 7 years ago

  • Subject changed from Problème d’encodage sur la levée d’une excéption to Problème d’encodage sur la levée d’une exception

#2 Updated by Joël Cuissinat over 7 years ago

  • Target version set to Eole 2.4-beta3

#3 Updated by Joël Cuissinat over 7 years ago

  • Status changed from Nouveau to Résolu
  • Assigned To set to Fabrice Barconnière
  • % Done changed from 0 to 100

Visiblement résolu par #6894

#4 Updated by Joël Cuissinat over 7 years ago

  • Status changed from Résolu to Fermé

Pas de problème d'encodage signalé ces derniers temps... pourvu que ça dure :)

Also available in: Atom PDF