Description
Deployment Type
Self-hosted
NetBox Version
v3.7.3
Python Version
3.8
Steps to Reproduce
- Clone or download https://github.com/netbox-community/Device-Type-Library-Import/
- Run the importer
NETBOX_URL=<your netbox instance> REPO_URL=https://github.com/netbox-community/devicetype-library/ NETBOX_TOKEN=<your netbox token> python3 nb-dt-import.py
This used to work, I believe this issue related to the change in this commit: 839609d.
It works in v3.7.2.
Expected Behavior
Images should be successfully uploaded and added to the Device Type.
Observed Behavior
Device-Type-Library-Import will get HTTP 400 error from the API when trying to upload images.
Example log message
Images {'front_image': '/Users/username/tmp/Device-Type-Library-Import/repo/elevation-images/Dell/dell-powervault-nx3240.front.png', 'rear_image': '/Users/username/tmp/Device-Type-Library-Import/repo/elevation-images/Dell/dell-powervault-nx3240.rear.png'} updated at https://localhost/api/dcim/device-types/393/: <Response [400]>
Further inspection of the response body shows:
{"front_image":["Enter a valid URL."],"rear_image":["Enter a valid URL."]}