Prefix (flat) generates reverse error when viewing child prefixes with available prefixes #5328

Closed
opened 2025-12-29 19:26:41 +01:00 by adam · 10 comments
Owner

Originally created by @hmsiqueiraa on GitHub (Sep 7, 2021).

Originally assigned to: @DanSheps on GitHub.

NetBox version

v.3.0.1

Python version

3.9

Steps to Reproduce

  1. Click on IPAM > Prefix > Child Prefix

Expected Behavior

A option to see the child prefixes that were already created and the option to create a new child prefix.

Observed Behavior

<class 'django.urls.exceptions.NoReverseMatch'>

Reverse for 'prefix' with arguments '(None,)' not found. 1 pattern(s) tried: ['ipam/prefixes/(?P[0-9]+)/$']

Python version: 3.9.2
NetBox version: 3.0.1

Originally created by @hmsiqueiraa on GitHub (Sep 7, 2021). Originally assigned to: @DanSheps on GitHub. ### NetBox version v.3.0.1 ### Python version 3.9 ### Steps to Reproduce 1. Click on IPAM > Prefix > Child Prefix ### Expected Behavior A option to see the child prefixes that were already created and the option to create a new child prefix. ### Observed Behavior <class 'django.urls.exceptions.NoReverseMatch'> Reverse for 'prefix' with arguments '(None,)' not found. 1 pattern(s) tried: ['ipam/prefixes/(?P<pk>[0-9]+)/$'] Python version: 3.9.2 NetBox version: 3.0.1
adam added the type: bugstatus: accepted labels 2025-12-29 19:26:41 +01:00
adam closed this issue 2025-12-29 19:26:41 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 7, 2021):

I'm not able to reproduce this.

Reverse for 'prefix' with arguments '(None,)' not found. 1 pattern(s) tried: ['ipam/prefixes/(?P[0-9]+)/$']

The pattern ipam/prefixes/(?P[0-9]+)/$ does not appear in the v3.0.1 code base. Are you using a plugin?

@jeremystretch commented on GitHub (Sep 7, 2021): I'm not able to reproduce this. > Reverse for 'prefix' with arguments '(None,)' not found. 1 pattern(s) tried: ['ipam/prefixes/(?P[0-9]+)/$'] The pattern `ipam/prefixes/(?P[0-9]+)/$` does not appear in the v3.0.1 code base. Are you using a plugin?
Author
Owner

@991jo commented on GitHub (Sep 7, 2021):

I have the same issue and it looks like it only appears if you display the "prefix flat" column in the table. This is in a netbox installation without plugins.

@991jo commented on GitHub (Sep 7, 2021): I have the same issue and it looks like it only appears if you display the "prefix flat" column in the table. This is in a netbox installation without plugins.
Author
Owner

@991jo commented on GitHub (Sep 7, 2021):

It also appears to be an issue when there are available prefixes.

@991jo commented on GitHub (Sep 7, 2021): It also appears to be an issue when there are available prefixes.
Author
Owner

@DanSheps commented on GitHub (Sep 7, 2021):

Steps to reproduce:

  1. Select a prefix with a child prefix
  2. Go to child prefixes
  3. Ensure "Prefix (flat)" is selected

This will generate the backtrace

@DanSheps commented on GitHub (Sep 7, 2021): Steps to reproduce: 1. Select a prefix with a child prefix 2. Go to child prefixes 3. Ensure "Prefix (flat)" is selected This will generate the backtrace
Author
Owner

@991jo commented on GitHub (Sep 7, 2021):

@DanSheps only if there are available child prefixes. If all are allocated there is no error.

@991jo commented on GitHub (Sep 7, 2021): @DanSheps only if there are available child prefixes. If all are allocated there is no error.
Author
Owner

@jeremystretch commented on GitHub (Sep 7, 2021):

  1. Ensure "Prefix (flat)" is selected

And this is the critical piece of information needed to replicate the bug that was omitted from the original report. This is why we continually stress the need to provide comprehensive, detailed bug reports. Thanks @DanSheps!

The pattern ipam/prefixes/(?P[0-9]+)/$ does not appear in the v3.0.1 code base.

We also see that part of the error message was lost due to the absence of proper formatting. The complete path is actually 'ipam/prefixes/(?P<pk>[0-9]+)/$'.

@jeremystretch commented on GitHub (Sep 7, 2021): > 3. Ensure "Prefix (flat)" is selected And this is the critical piece of information needed to replicate the bug that was omitted from the original report. This is why we continually stress the need to provide **comprehensive, detailed** bug reports. Thanks @DanSheps! > The pattern `ipam/prefixes/(?P[0-9]+)/$` does not appear in the v3.0.1 code base. We also see that part of the error message was lost due to the absence of proper formatting. The complete path is actually `'ipam/prefixes/(?P<pk>[0-9]+)/$'`.
Author
Owner

@falz commented on GitHub (Sep 10, 2021):

I'm encountering this issue after an upgrade from 2.11.9 -> 2.11.12. Can the bugfix be backported back to 2.11.x please?

slack thread with details of my issue: https://netdev-community.slack.com/archives/C01P0FRSXRV/p1631283365005200

We cannot move to 3.x for a while related to Python 3.7 not being easily and cleanly available on Centos 7 (the current long term Centos release).

@falz commented on GitHub (Sep 10, 2021): I'm encountering this issue after an upgrade from 2.11.9 -> 2.11.12. Can the bugfix be backported back to 2.11.x please? slack thread with details of my issue: https://netdev-community.slack.com/archives/C01P0FRSXRV/p1631283365005200 We cannot move to 3.x for a while related to Python 3.7 not being easily and cleanly available on Centos 7 (the current long term Centos release).
Author
Owner

@jeremystretch commented on GitHub (Sep 10, 2021):

I'm afraid we don't backport changes to previous releases. You can install Python 3.7 on CentOS 7 quite easily though: https://tecadmin.net/install-python-3-7-on-centos/

@jeremystretch commented on GitHub (Sep 10, 2021): I'm afraid we don't backport changes to previous releases. You can install Python 3.7 on CentOS 7 quite easily though: https://tecadmin.net/install-python-3-7-on-centos/
Author
Owner

@falz commented on GitHub (Sep 10, 2021):

Way OT re: python3.7+Centos7 - my specific note there is "cleanly" - every solution i've found (including previous link) is not proper with packages, which the procedure to keep ones servers up to date means that one netbox server is now a special flower that this other manual procedure from source.

none of this is obvioulsy a real netbox issue, but for future folk if stumble across.

due to this however, I suspect myself and many others would love a backport of things that were broken between 2.11.x releases, which this is one of.

@falz commented on GitHub (Sep 10, 2021): Way OT re: python3.7+Centos7 - my specific note there is "cleanly" - every solution i've found (including previous link) is not proper with packages, which the procedure to keep ones servers up to date means that one netbox server is now a special flower that this other manual procedure from source. none of this is obvioulsy a real netbox issue, but for future folk if stumble across. due to this however, I suspect myself and many others would love a backport of things that were broken between 2.11.x releases, which this is one of.
Author
Owner

@DanSheps commented on GitHub (Sep 22, 2021):

Way OT re: python3.7+Centos7 - my specific note there is "cleanly" - every solution i've found (including previous link) is not proper with packages, which the procedure to keep ones servers up to date means that one netbox server is now a special flower that this other manual procedure from source.

You need to use SCL packages. These are "proper" packages and also do not break your CentOS release in the way they are installed.

@DanSheps commented on GitHub (Sep 22, 2021): > Way OT re: python3.7+Centos7 - my specific note there is "cleanly" - every solution i've found (including previous link) is not proper with packages, which the procedure to keep ones servers up to date means that one netbox server is now a special flower that this other manual procedure from source. You need to use SCL packages. These are "proper" packages and also do not break your CentOS release in the way they are installed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5328