Device bulk import error "Unexpected column header" for rack_name #3719

Closed
opened 2025-12-29 18:30:46 +01:00 by adam · 6 comments
Owner

Originally created by @erdems on GitHub (May 22, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.8.4

Steps to Reproduce

  1. Create a device including its position in an existing rack.
  2. Export devices using web ui.
  3. Delete device(s) and try to import from exported CSV.

Expected Behavior

The import should be successful.

Observed Behavior

Device import fails with the following message:

Unexpected column header "rack_name" found.

Originally created by @erdems on GitHub (May 22, 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.8.4 <!-- 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. Create a device including its position in an existing rack. 2. Export devices using web ui. 3. Delete device(s) and try to import from exported CSV. <!-- What did you expect to happen? --> ### Expected Behavior The import should be successful. <!-- What happened instead? --> ### Observed Behavior Device import fails with the following message: Unexpected column header "rack_name" found.
adam closed this issue 2025-12-29 18:30:46 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 22, 2020):

This is expected behavior. The import form details the supported column headers.

@jeremystretch commented on GitHub (May 22, 2020): This is expected behavior. The import form details the supported column headers.
Author
Owner

@erdems commented on GitHub (May 22, 2020):

Thanks Jeremy,

Am I wrong to assume that since "rack" is supported (which references the existing rack name), import should work with "rack"?

If so, then the problem becomes this error message, for an existing rack name:

Row 1 rack: Object not found.

@erdems commented on GitHub (May 22, 2020): Thanks Jeremy, Am I wrong to assume that since "rack" is supported (which references the existing rack name), import should work with "rack"? If so, then the problem becomes this error message, for an existing rack name: Row 1 rack: Object not found.
Author
Owner

@FRebbel commented on GitHub (May 27, 2020):

Thanks Jeremy, Am I wrong to assume that since "rack" is supported (which references the existing rack name), import should work with "rack"? If so, then the problem becomes this error message, for an existing rack name: Row 1 rack: Object not found.

I'm facing the exact same problem. When I try to import a device with a rack, I get:

  • Row 1 rack: Object not found.
@FRebbel commented on GitHub (May 27, 2020): > Thanks Jeremy, Am I wrong to assume that since "rack" is supported (which references the existing rack name), import should work with "rack"? If so, then the problem becomes this error message, for an existing rack name: Row 1 rack: Object not found. I'm facing the exact same problem. When I try to import a device with a rack, I get: * Row 1 rack: Object not found.
Author
Owner

@FRebbel commented on GitHub (May 27, 2020):

So I digged a bit deeper. There are two cases:

  1. Rack not assigned to a Rack Group
  2. Rack assigned to a Rack Group

In the first case, I can import a device with the rack name without a problem. The second case seems to require the rack group. When I add the rack group, the import works for me.

Maybe this is intended behaviour? On first sight, this wasn't obvious for me.

@FRebbel commented on GitHub (May 27, 2020): So I digged a bit deeper. There are two cases: 1. Rack not assigned to a Rack Group 2. Rack assigned to a Rack Group In the first case, I can import a device with the rack name without a problem. The second case seems to require the rack group. When I add the rack group, the import works for me. Maybe this is intended behaviour? On first sight, this wasn't obvious for me.
Author
Owner

@erdems commented on GitHub (May 31, 2020):

My case was a bit different; I was merely trying to import the data I had exported the same day, from the same setup.

Just tested with 2.8.5 and whatever was the problem, it seems to have disappeared.

@erdems commented on GitHub (May 31, 2020): My case was a bit different; I was merely trying to import the data I had exported the same day, from the same setup. Just tested with 2.8.5 and whatever was the problem, it seems to have disappeared.
Author
Owner

@bcohee commented on GitHub (Sep 9, 2020):

  1. Rack not assigned to a Rack Group
  2. Rack assigned to a Rack Group

For the first case I had to REMOVE the Rack Group field header if the rack is not assigned a Rack Group

@FRebbel

For tracking:

https://github.com/netbox-community/netbox/issues/4970

https://github.com/netbox-community/netbox/issues/4429

@bcohee commented on GitHub (Sep 9, 2020): > 1. Rack not assigned to a Rack Group > 2. Rack assigned to a Rack Group For the first case I had to REMOVE the Rack Group field header if the rack is not assigned a Rack Group @FRebbel For tracking: https://github.com/netbox-community/netbox/issues/4970 https://github.com/netbox-community/netbox/issues/4429
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3719