'CircuitTermination' object has no attribute 'name'
See original GitHub issueEnvironment
- Python version: “3.7.3”
- NetBox version: “2.10.3”
Steps to Reproduce
On the API, in the page 3 i have this error 500:
"Got AttributeError when attempting to get a value for field `name` on serializer `NestedInterfaceSerializer`.\nThe serializer field might be named incorrectly and not match any attribute or key on the `CircuitTermination` instance.\nOriginal exception text was: 'CircuitTermination' object has no attribute 'name'."
URL called is : https://netbox/api/circuits/circuits/?cf_technology=VDSL&offset=100&type=s-internet-over-best-effort-line
I have 167 circuits that match my search. Only part 100 - 150 does not work.
This URL works :
URL called is : https://netbox/api/circuits/circuits/?cf_technology=VDSL&type=s-internet-over-best-effort-line URL called is : https://netbox/api/circuits/circuits/?cf_technology=VDSL&offset=50&type=s-internet-over-best-effort-line URL called is : https://netbox/api/circuits/circuits/?cf_technology=VDSL&offset=150&type=s-internet-over-best-effort-line
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Issues with export templates after upgrade to 2.11
Interface object' has no attribute 'cable_peer'. It seems I can't access data outside of the interface scope any longer.
Read more >AttributeError: 'Anonymousidentity' object has no attribute 'name'
I'm using Flask to build a website. But when I open 127.0.0.1:5000, it returns AttributeError: 'Anonymousidentity' object has no attribute 'name ...
Read more >nautobot-circuit-maintenance - PyPI
The plugin is compatible with Nautobot 1.0.0b4 and higher ... "labels_attached") with the label name and the attributes within the Circuit object.
Read more >Posts by Year - NetBox.dev
The first beta release for NetBox v3.4 has just been released! ... object names; #9775 - Fix exception when viewing a report with...
Read more >CHANGELOG.md - netbox - GitLab
API Support for Specifying Related Objects by Attributes(#3077) ... raised when creating/viewing a circuit with a non-connected termination ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @Hedius for taking the time to provide a detailed reproduction script per the issue template. Using the information you provided, I was able to replicate the reported bug, and can now work on fixing it.
Environment
Hello. Clean/Empty installation. Maybe less steps are needed, but our setup for this issue looks exactly like this.
Steps to Reproduce
Create Provider1
Create Provider2
Create Tenant1
Create Tenant2
Create Site1
Create Device Role: Cable Management
Create Manufacturer1
Create Device Type: housing-panel – Manufacturer1 – Height 1U
Create Device Tray1 – Role: Cable Management – Device Type: housing-panel – Site: Site1 – Tenant: Tenant1
Add a rear port: Rear Port 1 – Type: LC/APC
Add a front port: Front Port 1 – Type: LC/APC – Assign the rear port
Create a Circuit Type: CircuitType1
Add Circuit1 – Provider: Provider1 – Type: CircuitType1 – Tenant: Tenant1
Add Circuit2 – Provider: Provider2 – Type: CircuitType1 – Tenant: Tenant2
Add a Z side to Circuit1 – Site: Site1 – 100Gbps up/down
Add a Z side to Circuit2 – Site: Site1 – 100Gbps up/down
Cable the Z side of Circuit1 to the device tray1 (Front Port 1)
Cable the Z side of Circuit2 to the device tray1 (Rear Port 1)
The setup should look like this:
Expected Behavior
The following queries should not fail: /api/circuits/circuits/2/ /api/circuits/circuits/1/ /api/circuits/circuits/
Observed Behavior
After doing this, opening both circuits via the API will fail:
{"error": "Got AttributeError when attempting to get a value for field `name` on serializer `NestedInterfaceSerializer`.\nThe serializer field might be named incorrectly and not match any attribute or key on the `CircuitTermination` instance.\nOriginal exception text was: 'CircuitTermination' object has no attribute 'name'.", "exception": "AttributeError", "netbox_version": "2.10.3", "python_version": "3.9.1"}
Queries that will fail: /api/circuits/circuits/2/ /api/circuits/circuits/1/ /api/circuits/circuits/
Conclusion
The problem is caused by the cables (maybe). Removing a cable will fix the problem for the now unplugged circuit.