Skip to content

Error creating manufacturers on Netbox 4.2.7 #169

Description

@sharkless

I just intalled a new netbox server for the company I work for. I started to the import and I get the following error message.

Error creating manufacturers
Error '{"manufacturer":["Related object not found using the provided attributes: {'name': 'Juniper', 'slug': 'juniper'}"]}' creating module type: {'manufacturer': {'name': 'Juniper', 'slug': 'juniper'}, 'model': 'JNP7100-FAN1RU-AO', 'part_number': 'JNP7100-FAN1RU-AO', 'comments': 'AFO Fan module for ACX7100 routers', 'src': '/opt/Device-Type-Library-Import/repo/module-types/Juniper/JNP7100-FAN1RU-AO.yaml'}
Error '{"manufacturer":["Related object not found using the provided attributes: {'name': 'Juniper', 'slug': 'juniper'}"]}' creating module type: {'manufacturer': {'name': 'Juniper', 'slug': 'juniper'}, 'model': 'SRX600-PWR-645AC-POE', 'part_number': '740-024283', 'comments': 'Juniper SRX550 Data Sheet\n', 'power-ports': [{'name': 'PSU {module}', 'type': 'iec-60320-c14', 'maximum_draw': 645}], 'src': '/opt/Device-Type-Library-Import/repo/module-types/Juniper/SRX600-PWR-645AC-POE.yaml'}
Traceback (most recent call last):
File "/opt/Device-Type-Library-Import/./nb-dt-import.py", line 54, in
main()
File "/opt/Device-Type-Library-Import/./nb-dt-import.py", line 35, in main
netbox.create_module_types(module_types)
File "/opt/Device-Type-Library-Import/netbox_api.py", line 176, in create_module_types
self.device_types.create_module_power_ports(curr_mt["power-ports"], module_type_res.id)
^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'module_type_res' where it is not associated with a value

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions