Skip to content

Cable Trace view crash #6060

@blgo

Description

@blgo

NetBox version

v2.10.7

Python version

3.8

Steps to Reproduce

This is the only path I have tested:

  1. Create a circuit
  2. Create an interface and a Device to link to
  3. Create a Site
    5: Create a Circuit Termination Site (Side A) in the circuit record
    6: Create an Interface termination (Side B) in the circuit record
    7: Upgrade to netbox v2.10.7
    8: Click on the Trace route icon in the Circuits view

Expected Behavior

Trace route tamplete should display instead of crashing the page

Observed Behavior

The Trace route view will crash on TypeError: failed to unpack non-iterable:

netbox/dcim/views.py: PathTraceView

total_length, is_definitive = path.get_total_length if path else (None, False)

This fixes the issue for me:

        try:
            total_length, is_definitive = path.get_total_length if path else (None, False)
        except TypeError as te:
            total_length, is_definitive = (None, False)
            

I have checked the Cable model objects in the netbox shell and they show _path ids before and after upgrading netbox and it shows an id (which means that a path exists for this cable).

Also I ran the management command that checks for missing paths and it does not show any issues.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions