ModuleNotFoundError exception rendering API schema under Python 3.9+ #7143

Closed
opened 2025-12-29 20:19:40 +01:00 by adam · 1 comment
Owner

Originally created by @jeremystretch on GitHub (Oct 20, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.3.5

Python version

3.9

Steps to Reproduce

  1. Install NetBox using Python 3.9 or later
  2. Visit /api/docs/?format=openapi to render the raw API schema

Expected Behavior

The schema should render successfully.

Observed Behavior

A ModuleNotFoundError exception is raised. This appears to be due to a conflict introduced by swagger-spec-validator v3.0.0 under Python 3.9 or later.

Originally created by @jeremystretch on GitHub (Oct 20, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.3.5 ### Python version 3.9 ### Steps to Reproduce 1. Install NetBox using Python 3.9 or later 2. Visit `/api/docs/?format=openapi` to render the raw API schema ### Expected Behavior The schema should render successfully. ### Observed Behavior A ModuleNotFoundError exception is raised. This appears to be due to a conflict introduced by `swagger-spec-validator` v3.0.0 under Python 3.9 or later.
adam added the type: bugstatus: accepted labels 2025-12-29 20:19:40 +01:00
adam closed this issue 2025-12-29 20:19:40 +01:00
Author
Owner

@tijuca commented on GitHub (Nov 2, 2022):

The underlying upstream issue in swagger_spec_validator has been fixed by adding the missed required additional package dependency.
1e10f01af0

There is now a new version 3.0.3 available which has included that fix. I'm using a local instance of NetBox 3.3.6 which is working fine with a by me patched swagger_spec_validator package.

@tijuca commented on GitHub (Nov 2, 2022): The underlying upstream issue in swagger_spec_validator has been fixed by adding the missed required additional package dependency. https://github.com/Yelp/swagger_spec_validator/commit/1e10f01af0e662b1ea073650f720b54ae95cd9c4 There is now a new version 3.0.3 available which has included that fix. I'm using a local instance of NetBox 3.3.6 which is working fine with a by me patched swagger_spec_validator package.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7143