Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AlertProfiles crashes with a UnicodeEncodeError when attempting to save a profile with non-ASCII characters in its name #1485

Closed
lunkwill42 opened this issue Mar 15, 2017 · 1 comment
Assignees
Labels
AD Related to Microsoft Active Directory bug
Milestone

Comments

@lunkwill42
Copy link
Member

lunkwill42 commented Mar 15, 2017

Seen from Django tracebacks mailed to us (NAV 4.6.1):

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/nav/web/alertprofiles/decorators.py", line 45, in _handler
    return func(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nav/web/alertprofiles/views.py", line 312, in profile_save
    'Saved profile {}'.format(profile.name),
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in position 14: ordinal not in range(128)
@lunkwill42 lunkwill42 added AD Related to Microsoft Active Directory bug labels Mar 15, 2017
@lunkwill42 lunkwill42 added this to the 4.6.2 milestone Mar 15, 2017
@lunkwill42
Copy link
Member Author

The profile is properly saved to the db, it's just the creation of the display message for the end user that fails, because unicode :P

@lunkwill42 lunkwill42 self-assigned this Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AD Related to Microsoft Active Directory bug
Projects
None yet
Development

No branches or pull requests

1 participant