Rendering a port traffic graph results in a UnicodeEncodeError

Bug #1480262 reported by Morten Brekkevold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
Morten Brekkevold

Bug Description

Attempting to render a traffic graph for a port that has non-ASCII characters in its ifalias will result in the following traceback:

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 109, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib/python2.7/dist-packages/nav/web/ipdevinfo/views.py", line 531, in port_counter_graph
    url = get_interface_counter_graph_url(port, timeframe, kind)

  File "/usr/lib/python2.7/dist-packages/nav/web/ipdevinfo/utils.py", line 426, in get_interface_counter_graph_url
    shortname=interface.netbox.get_short_sysname(),

UnicodeEncodeError: 'ascii' codec can't encode character u'\xd8' in position 21: ordinal not in range(128)

SNMP is not defined for non-ASCII data, but it can nontheless often be configured on the CLI side, which can result in this.

Tags: unicode
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :
Changed in nav:
status: In Progress → Fix Committed
Changed in nav:
status: Fix Committed → 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.