Server Error when attempting a Cable Bulk Import #7572

Closed
opened 2025-12-29 20:25:34 +01:00 by adam · 3 comments
Owner

Originally created by @ouberlord on GitHub (Jan 27, 2023).

NetBox version

v3.4.2

Python version

3.8

Steps to Reproduce

  1. Click on the blue "Import" button next to "Cables" in the left-hand panel.
  2. Supply the data to be uploaded via either method:
    1. Data Import: Paste the CSV data to be imported into the "Data" field.
    2. Upload File: Click "Choose File" to select the CSV file that contains the data to be imported.
  3. Click the blue "Submit" button.

Example data that can be used to reproduce the error:

side_a_name,side_b_name,side_a_type,side_b_type,status,type,side_a_device,side_b_device
1-Fiber-1,1-Fiber-1,dcim.rearport,dcim.rearport,connected,smf-os1,Corning CCH-04U (790),Corning CCH-04U (789)
1-Fiber-2,1-Fiber-2,dcim.rearport,dcim.rearport,connected,smf-os1,Corning CCH-04U (790),Corning CCH-04U (789)

Expected Behavior

The import process should either succeed and reach a screen showing the resulting cable objects created within NetBox, or fail with a red error in the bottom right (such as for when required columns are missing, etc.).

Observed Behavior

The following error is displayed. The objects are not imported, and no other error is seen:

Server Error
There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'ValueError'>

'Cable' instance needs to have a primary key value before this relationship can be used.

Python version: 3.8.13
NetBox version: 3.4.2
Originally created by @ouberlord on GitHub (Jan 27, 2023). ### NetBox version v3.4.2 ### Python version 3.8 ### Steps to Reproduce 1. Click on the blue "Import" button next to "Cables" in the left-hand panel. 2. Supply the data to be uploaded via either method: 1. Data Import: Paste the CSV data to be imported into the "Data" field. 2. Upload File: Click "Choose File" to select the CSV file that contains the data to be imported. 3. Click the blue "Submit" button. Example data that can be used to reproduce the error: ```csv side_a_name,side_b_name,side_a_type,side_b_type,status,type,side_a_device,side_b_device 1-Fiber-1,1-Fiber-1,dcim.rearport,dcim.rearport,connected,smf-os1,Corning CCH-04U (790),Corning CCH-04U (789) 1-Fiber-2,1-Fiber-2,dcim.rearport,dcim.rearport,connected,smf-os1,Corning CCH-04U (790),Corning CCH-04U (789) ``` ### Expected Behavior The import process should either succeed and reach a screen showing the resulting cable objects created within NetBox, or fail with a red error in the bottom right (such as for when required columns are missing, etc.). ### Observed Behavior The following error is displayed. The objects are not imported, and no other error is seen: **Server Error** There was a problem with your request. Please contact an administrator. The complete exception is provided below: ``` <class 'ValueError'> 'Cable' instance needs to have a primary key value before this relationship can be used. Python version: 3.8.13 NetBox version: 3.4.2 ```
adam added the type: bugstatus: duplicate labels 2025-12-29 20:25:34 +01:00
adam closed this issue 2025-12-29 20:25:34 +01:00
Author
Owner

@jbeck1563 commented on GitHub (Jan 27, 2023):

I was having the same error, reported by another #11210
Fixed in release #11551

@jbeck1563 commented on GitHub (Jan 27, 2023): I was having the same error, reported by another #11210 Fixed in release #11551
Author
Owner

@ouberlord commented on GitHub (Jan 27, 2023):

Ah! My apologies. We only upgraded to v3.4.2 very recently (mid last week), and I didn't notice the v3.4.3 release was out. This issue does appear to be both a duplicate of #11210, and fixed in the #11551 release. I will close this issue as such. Thank you!

@ouberlord commented on GitHub (Jan 27, 2023): Ah! My apologies. We only upgraded to v3.4.2 very recently (mid last week), and I didn't notice the v3.4.3 release was out. This issue does appear to be both a duplicate of #11210, and fixed in the #11551 release. I will close this issue as such. Thank you!
Author
Owner

@ouberlord commented on GitHub (Jan 27, 2023):

This issue is a duplicate of #11210, and has been fixed in the #11551 release.

@ouberlord commented on GitHub (Jan 27, 2023): This issue is a duplicate of #11210, and has been fixed in the #11551 release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7572