Topology map generation breaks on circuits with no Z termination interface set #1037

Closed
opened 2025-12-29 16:28:10 +01:00 by adam · 0 comments
Owner

Originally created by @miek on GitHub (Jun 15, 2017).

Issue type: Bug report

Python version: 2.7.13
NetBox version: 2.0.6

I had a circuit with A and Z terminations defined, but no termination device/interface set on the Z side. There is a topology map defined with the device pattern .* to add everything for testing.

When trying to render the graph I get the following error:

There was an error generating the requested graph. Ensure that the GraphViz executables have been installed correctly.

I believe this is caused by 293dbd8a8b/netbox/extras/models.py (L374) where peer_termination is checked, but peer_termination.interface is not. The following exception is then raised (triggering the error above):

<type 'exceptions.AttributeError'>
'NoneType' object has no attribute 'device'
Originally created by @miek on GitHub (Jun 15, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type: Bug report <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version:** 2.7.13 **NetBox version:** 2.0.6 I had a circuit with A and Z terminations defined, but no termination device/interface set on the Z side. There is a topology map defined with the device pattern `.*` to add everything for testing. When trying to render the graph I get the following error: > There was an error generating the requested graph. Ensure that the GraphViz executables have been installed correctly. I believe this is caused by https://github.com/digitalocean/netbox/blob/293dbd8a8b2c291d1ae9efc7b2f2137fc896833b/netbox/extras/models.py#L374 where `peer_termination` is checked, but `peer_termination.interface` is not. The following exception is then raised (triggering the error above): <type 'exceptions.AttributeError'> 'NoneType' object has no attribute 'device'
adam added the type: bug label 2025-12-29 16:28:10 +01:00
adam closed this issue 2025-12-29 16:28:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1037