Unable to import any CSV's #6966

Closed
opened 2025-12-29 19:47:15 +01:00 by adam · 4 comments
Owner

Originally created by @ghost on GitHub (Sep 12, 2022).

NetBox version

v3.3.2

Python version

3.10

Steps to Reproduce

This is reproduceable on the demo site as well.
If you attempt to export data, then import the data, it will generate an error
"Unexpected column header "Name" found."

  1. go to any page (I picked custom fields for my example)
  2. click 'export' and 'all data (CSV)'
  3. attempt to import the CSV into a new clean version of netbox

An import error will be observed with the following error "Unexpected column header "Name" found."

Expected Behavior

Data should import correctly.

Observed Behavior

Data is not importing correctly.

Originally created by @ghost on GitHub (Sep 12, 2022). ### NetBox version v3.3.2 ### Python version 3.10 ### Steps to Reproduce This is reproduceable on the demo site as well. If you attempt to export data, then import the data, it will generate an error "Unexpected column header "Name" found." 1) go to any page (I picked custom fields for my example) 2) click 'export' and 'all data (CSV)' 3) attempt to import the CSV into a new clean version of netbox An import error will be observed with the following error "Unexpected column header "Name" found." ### Expected Behavior Data should import correctly. ### Observed Behavior Data is not importing correctly.
adam closed this issue 2025-12-29 19:47:15 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 12, 2022):

This is not a bug. Please read the instructions below each import form to see the supported columns for each object type.

@jeremystretch commented on GitHub (Sep 12, 2022): This is not a bug. Please read the instructions below each import form to see the supported columns for each object type.
Author
Owner

@ghost commented on GitHub (Sep 12, 2022):

How is it not a bug? Why would netbox export ALL fields into a CSV and then not import its own export correctly?

I'm not doing anything special other than going to a page and selecting export to CSV. If you can't just click export to CSV without having to specify columns and read other documentation should the ability to export to CSV be removed then?

@ghost commented on GitHub (Sep 12, 2022): How is it not a bug? Why would netbox export ALL fields into a CSV and then not import its own export correctly? I'm not doing anything special other than going to a page and selecting export to CSV. If you can't just click export to CSV without having to specify columns and read other documentation should the ability to export to CSV be removed then?
Author
Owner

@jeremystretch commented on GitHub (Sep 12, 2022):

How is it not a bug?

It is not a bug because, as the error message indicates, your input data does not match the supported format, which is clearly documented. If you correct your data per the documented format, the import will succeed.

Why would netbox export ALL fields into a CSV and then not import its own export correctly?

Because these are not symmetric operations. Exported data is intended for human consumption, whereas input data must be strictly formatted to match NetBox's internal data models.

@jeremystretch commented on GitHub (Sep 12, 2022): > How is it not a bug? It is not a bug because, as the error message indicates, your input data does not match the supported format, which is clearly documented. If you correct your data per the documented format, the import will succeed. > Why would netbox export ALL fields into a CSV and then not import its own export correctly? Because these are not symmetric operations. *Exported* data is intended for human consumption, whereas *input* data must be strictly formatted to match NetBox's internal data models.
Author
Owner

@ghost commented on GitHub (Sep 12, 2022):

My question wasn't answered. which is why I created a discussion to perhaps have the community help me understand. I cannot fathom why you have such an adversarial attitude towards people that are trying to learn this tool.

Attached are my custom fields. The 2nd screenshot is what those fields look like in the CSV. The 3rd screenshot is me attempting to import a custom field from the demo site's export. As you can see, the error persists.

However, because I am actually trying to understand the issue I actually figured out what the problem is.
The problem is, the import process uses case sensitive field names. Name<>name. The import process is expecting 'name', when the CSV export process calls the field 'Name'.
1
2
3

It would be nice if something like that is mentioned somewhere in the documentation. Or perhaps I could create a a feature request to have the CSV export process use the same field names that the import process is expected. However, it feels like you'll just close that because you 'don't agree' with it, or 'don't understand the use case'.

@ghost commented on GitHub (Sep 12, 2022): My question wasn't answered. which is why I created a discussion to perhaps have the community help me understand. I cannot fathom why you have such an adversarial attitude towards people that are trying to learn this tool. Attached are my custom fields. The 2nd screenshot is what those fields look like in the CSV. The 3rd screenshot is me attempting to import a custom field from the demo site's export. As you can see, the error persists. However, because I am actually trying to understand the issue I actually figured out what the problem is. The problem is, the import process uses case sensitive field names. Name<>name. The import process is expecting 'name', when the CSV export process calls the field 'Name'. ![1](https://user-images.githubusercontent.com/77940332/189555232-6ed7ffc8-a7ec-4708-9a47-fd68e2ee05a3.png) ![2](https://user-images.githubusercontent.com/77940332/189555235-5b2bf4d3-fd75-4b56-895c-e7a196b93e55.png) ![3](https://user-images.githubusercontent.com/77940332/189555236-f51eb267-c5b1-4be7-8e0e-f4ada23ddf25.png) It would be nice if something like that is mentioned somewhere in the documentation. Or perhaps I could create a a feature request to have the CSV export process use the same field names that the import process is expected. However, it feels like you'll just close that because you 'don't agree' with it, or 'don't understand the use case'.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6966