Unexpected error message on device bulk import into non-existing site #3949

Closed
opened 2025-12-29 18:32:14 +01:00 by adam · 9 comments
Owner

Originally created by @dare-to-recurse on GitHub (Aug 6, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.9-beta1

Steps to Reproduce

  1. Log in with an account that's set as a superuser
  2. Attempt to import one or more device instances of any device-type into a non-existing site, e.g. asdfasdf

Expected Behavior

  • An error message informing the user that the site does not exist is displayed

Observed Behavior

  • The error message "Object import failed due to object-level permissions violation" is displayed
Originally created by @dare-to-recurse on GitHub (Aug 6, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.6.8 * NetBox version: 2.9-beta1 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Log in with an account that's set as a superuser 2. Attempt to import one or more device instances of any device-type into a non-existing site, e.g. asdfasdf <!-- What did you expect to happen? --> ### Expected Behavior * An error message informing the user that the site does not exist is displayed <!-- What happened instead? --> ### Observed Behavior * The error message "Object import failed due to object-level permissions violation" is displayed
adam added the type: bugbeta labels 2025-12-29 18:32:14 +01:00
adam closed this issue 2025-12-29 18:32:14 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 6, 2020):

I'm not able to replicate this on the current develop-2.9 branch. I get a validation error as expected:

Row 1 site: Object not found.

Correcting the site field results in the device being imported as expected.

@jeremystretch commented on GitHub (Aug 6, 2020): I'm not able to replicate this on the current `develop-2.9` branch. I get a validation error as expected: > Row 1 site: Object not found. Correcting the site field results in the device being imported as expected.
Author
Owner

@dare-to-recurse commented on GitHub (Aug 10, 2020):

I'm having no luck reproducing the odd error message in a clean install of the beta either whatsoever.
Probably not worth keeping the issue open?

@dare-to-recurse commented on GitHub (Aug 10, 2020): I'm having no luck reproducing the odd error message in a clean install of the beta either whatsoever. Probably not worth keeping the issue open?
Author
Owner

@jeremystretch commented on GitHub (Aug 10, 2020):

Going to close this out, but please do ask that it be reopened if you happen to replicate it again.

@jeremystretch commented on GitHub (Aug 10, 2020): Going to close this out, but please do ask that it be reopened if you happen to replicate it again.
Author
Owner

@roundtripdelay commented on GitHub (Sep 8, 2020):

I am experiencing the same issue after a recent upgrade from 2.7.8 to 2.9.3 and receive an "Object import failed due to object-level permissions violation" message.

In my case, we swapped out some PDUs and console servers in some racks. I deleted these devices and then attempted to import the new devices but got the object-level permissions message.

Can we reopen or would a new bug be better? Thanks!

@roundtripdelay commented on GitHub (Sep 8, 2020): I am experiencing the same issue after a recent upgrade from 2.7.8 to 2.9.3 and receive an "Object import failed due to object-level permissions violation" message. In my case, we swapped out some PDUs and console servers in some racks. I deleted these devices and then attempted to import the new devices but got the object-level permissions message. Can we reopen or would a new bug be better? Thanks!
Author
Owner

@roundtripdelay commented on GitHub (Sep 8, 2020):

Manually adding the device at https://server/dcim/devices/add/ works.

@roundtripdelay commented on GitHub (Sep 8, 2020): Manually adding the device at https://server/dcim/devices/add/ works.
Author
Owner

@JensBavenmark commented on GitHub (Sep 21, 2020):

Got the same error as roundtripdelay.

Am importing a lot of devices with the Device Bulk Import to a new setup of Netbox 2.9.3.

@JensBavenmark commented on GitHub (Sep 21, 2020): Got the same error as roundtripdelay. Am importing a lot of devices with the Device Bulk Import to a new setup of Netbox 2.9.3.
Author
Owner

@JensBavenmark commented on GitHub (Sep 21, 2020):

Think I found the reason. I was importing some item that had Device Types that wasnt created in Netbox. After creating them the import worked again. So it seems to just be a case of that the error message is not as clear as would be appreciated.

@JensBavenmark commented on GitHub (Sep 21, 2020): Think I found the reason. I was importing some item that had Device Types that wasnt created in Netbox. After creating them the import worked again. So it seems to just be a case of that the error message is not as clear as would be appreciated.
Author
Owner

@marc-rose commented on GitHub (Oct 27, 2020):

I had the same problem importing in v2.9.4, but found I was incorrectly importing by Device Type model rather than Device Type name

@marc-rose commented on GitHub (Oct 27, 2020): I had the same problem importing in v2.9.4, but found I was incorrectly importing by Device Type **model** rather than Device Type **name**
Author
Owner

@SelimBF commented on GitHub (Nov 6, 2020):

i had the same problem importing my teammate exported backup to my own netbox but it seem that there some devices undefined or unkown colomun that you try to import .
I suggest that you verify that all collumn in csv file are already defined

@SelimBF commented on GitHub (Nov 6, 2020): i had the same problem importing my teammate exported backup to my own netbox but it seem that there some devices undefined or unkown colomun that you try to import . I suggest that you verify that all collumn in csv file are already defined
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3949