CSV import does not support line breaks within a field #1528

Closed
opened 2025-12-29 16:32:43 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Feb 2, 2018).

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.2.9

Description

The manner in which NetBox imports objects in CSV format does not properly support multi-line field values, such as the physical_address for a site. Line breaks within a field are stripped from the input, such that

Hank Hill
123 Rainey St
Arlen TX 73104

becomes

Hank Hill123 Rainey StArlen TX 73104

We should be able to correct this behavior by leveraging StringIO to treat the input as a file when passing it to the CSV reader.

Originally created by @jeremystretch on GitHub (Feb 2, 2018). ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [x] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: 2.2.9 ### Description The manner in which NetBox imports objects in CSV format does not properly support multi-line field values, such as the `physical_address` for a site. Line breaks within a field are stripped from the input, such that ``` Hank Hill 123 Rainey St Arlen TX 73104 ``` becomes ``` Hank Hill123 Rainey StArlen TX 73104 ``` We should be able to correct this behavior by leveraging StringIO to treat the input as a file when passing it to the CSV reader.
adam added the type: bugstatus: accepted labels 2025-12-29 16:32:43 +01:00
adam closed this issue 2025-12-29 16:32:43 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1528