Project

General

Profile

Development #43287

import_site: UnicodeEncodeError: 'ascii' codec can't encode character u'\xf4' in position 26: ordinal not in range(128)

Added by Serghei Mihai about 1 month ago. Updated 4 days ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
25 May 2020
Due date:
% Done:

0%

Patch proposed:
Yes
Planning:
No

Description

Lors d'une tentative d'import d'un json avec les rôle:

sudo -u authentic-multitenant authentic2-multitenant-manage tenant_command import_site /tmp/a2_villeurbanne_export.json -d connexion-villeurbanne.test.entrouvert.org -v 3

Les messages d'erreur ne peuvent être affichés:

Traceback (most recent call last):
  File "/usr/lib/authentic2/manage.py", line 21, in <module>
    execute_from_command_line(sys.argv[:1] + argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/hobo/multitenant/management/commands/tenant_command.py", line 140, in run_from_argv
    klass.run_from_argv(args)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python2.7/dist-packages/hobo/agent/authentic2/apps.py", line 45, in new_execute
    return old_execute(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/authentic2/management/commands/import_site.py", line 81, in handle
    result = import_site(json.load(f), ImportContext(**c_kwargs))
  File "/usr/lib/python2.7/dist-packages/authentic2/data_transfer.py", line 371, in import_site
    result.update_parentings(*ds.parentings())
  File "/usr/lib/python2.7/dist-packages/authentic2/data_transfer.py", line 193, in f
    'errors': lazy_join(', ', [v.message for v in e.error_list]),
  File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 162, in __mod__
    return six.text_type(self) % rhs
  File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 119, in __text_cast
    return func(*self.__args, **self.__kw)
  File "/usr/lib/python2.7/dist-packages/django/utils/text.py", line 448, in _format_lazy
    return format_string.format(*args, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf4' in position 26: ordinal not in range(128)

0001-misc-use-unicode-strings-in-lazy_join-43287.patch View (2.63 KB) Benjamin Dauvergne, 26 May 2020 10:20 AM

Associated revisions

Revision c9a6f1b7 (diff)
Added by Benjamin Dauvergne 18 days ago

misc: use unicode strings in lazy_join (#43287)

History

#1 Updated by Valentin Deniaud about 1 month ago

Looks like #42584.

#2 Updated by Benjamin Dauvergne about 1 month ago

  • Assignee set to Benjamin Dauvergne

#3 Updated by Benjamin Dauvergne about 1 month ago

#4 Updated by Serghei Mihai about 1 month ago

  • Status changed from Solution proposée to Solution validée

#5 Updated by Benjamin Dauvergne 18 days ago

  • Status changed from Solution validée to Résolu (à déployer)
commit c9a6f1b75495a99e14992aec3b0beb9ba9ba759e
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue May 26 10:20:04 2020 +0200

    misc: use unicode strings in lazy_join (#43287)

#6 Updated by Frédéric Péters 4 days ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF