Skip to content

Field 'id' expected a number but got '' #602

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

Open
yomiury opened this issue Jan 27, 2025 · 4 comments
Open

Field 'id' expected a number but got '' #602

yomiury opened this issue Jan 27, 2025 · 4 comments
Labels
pending closure Requires immediate attention to avoid being closed for inactivity status: under review Further discussion is needed to determine this issue's scope and/or implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@yomiury
Copy link

yomiury commented Jan 27, 2025

NetBox version

v4.2.2

Topology Views version

v 4.2.0

Steps to Reproduce

Access to the topology views did not show anything.
When I try to search using the following settings:
show_cables: True
show_logical_connections: True
group_locations: True
node_label_items: devicename
role_id: 7
role_id: 2
role_id: 1
The server responds with a 500 Internal Server Error.

Expected Behavior

Show the topology

Observed Behavior

<class 'ValueError'>

Field 'id' expected a number but got ''.

Python version: 3.12.3
NetBox version: 4.2.2
Plugins:
netbox_napalm_plugin: 0.3.1
netbox_qrcode: 0.0.16
netbox_topology_views: 4.2.0

@yomiury yomiury added the type: bug A confirmed report of unexpected behavior in the application label Jan 27, 2025
@oyvindmo
Copy link

oyvindmo commented Mar 11, 2025

I see this too, but it is browser dependent. It works in Edge, but not in Chrome or Firefox.

Looking at the network requests performed by the different browser, I notice a difference when I select a saved filter and click the Search button.

Edge:
Performs a request to topology/?filter_id=6

Chrome and Firefox:
Perform a request to topology/?q=&filter_id=6&group=&show_unconnected=&show_cables=&show_logical_connections=&show_single_cable_logical_conns=[...]

If I manually remove just the "group=" parameter from the URL, the topology is rendered correctly.

I am on Netbox v4.2.4 and Topology Views v4.2.4.

@oyvindmo
Copy link

Another observation: If I select 'default' in the Coordinate group drop-down, and click Search, the request contains group=1, and doesn't give the ValueError. However, no topology is actually shown. But if I then click in the Chrome address field and just press enter to request the page again, the topology is shown.

@oyvindmo
Copy link

Ah! This problem only occurs when the experimental HTMX Navigation is enabled in personal preferences.

@dreng
Copy link
Collaborator

dreng commented May 9, 2025

I actually don't see what we can do here for the moment. It seems that HTMX is to blame which can only be fixed upstream.

@dreng dreng added status: under review Further discussion is needed to determine this issue's scope and/or implementation pending closure Requires immediate attention to avoid being closed for inactivity labels May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending closure Requires immediate attention to avoid being closed for inactivity status: under review Further discussion is needed to determine this issue's scope and/or implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants