api devices export fails #5444

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

Originally created by @rfdrake on GitHub (Sep 29, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.0.4

Python version

3.9

Steps to Reproduce

  1. Create an export template. Name: g, Content Type: dcim | devices. Query: {{ queryset }}
  2. perform an api call to https://netbox/api/dcim/devices/?export=g
  3. error: 'NoneType' object has no attribute 'Meta'
  4. move the export template to dcim | sites
  5. rerun api call to https://netbox/api/dcim/sites/?export=g
  6. success

Expected Behavior

The export template should be run, the same way as if it is run in the netbox site UI.

Observed Behavior

<class 'AttributeError'>
'NoneType' object has no attribute 'Meta' Python version: 3.9.5 NetBox version: 3.0.4
Originally created by @rfdrake on GitHub (Sep 29, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.0.4 ### Python version 3.9 ### Steps to Reproduce 1. Create an export template. Name: g, Content Type: dcim | devices. Query: {{ queryset }} 2. perform an api call to https://netbox/api/dcim/devices/?export=g 3. error: 'NoneType' object has no attribute 'Meta' 4. move the export template to dcim | sites 5. rerun api call to https://netbox/api/dcim/sites/?export=g 6. success ### Expected Behavior The export template should be run, the same way as if it is run in the netbox site UI. ### Observed Behavior <pre><strong>&lt;class &#x27;AttributeError&#x27;&gt;</strong><br /> &#x27;NoneType&#x27; object has no attribute &#x27;Meta&#x27; Python version: 3.9.5 NetBox version: 3.0.4</pre>
adam added the type: bugstatus: accepted labels 2025-12-29 19:28:04 +01:00
adam closed this issue 2025-12-29 19:28:04 +01:00
Author
Owner

@rfdrake commented on GitHub (Sep 29, 2021):

I tried this on v3.0.3 at first and had the same issue. I upgraded to 3.0.4 to see if it was fixed.

I also ran this against the public netbox demo because i wanted to make sure that my devices data wasn't somehow corrupted and causing the issue. I saw the same thing on that site, so I don't think it's my data. It may still be something I'm just doing wrong. This is the first time I've tried to use export templates via the API.

@rfdrake commented on GitHub (Sep 29, 2021): I tried this on v3.0.3 at first and had the same issue. I upgraded to 3.0.4 to see if it was fixed. I also ran this against the public netbox demo because i wanted to make sure that my devices data wasn't somehow corrupted and causing the issue. I saw the same thing on that site, so I don't think it's my data. It may still be something I'm just doing wrong. This is the first time I've tried to use export templates via the API.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5444