devicetype-library icon indicating copy to clipboard operation
devicetype-library copied to clipboard

UnboundLocalError: local variable 'module_type_res' referenced before assignment

Open marmalodak opened this issue 1 year ago • 2 comments

Invoked like this:

❯ ./nb-dt-import.py > /tmp/nb-dt-import.out 2> /tmp/nb-dt-import.err
Traceback (most recent call last):
  File "/home/john/device-type-import/Device-Type-Library-Import/./nb-dt-import.py", line 54, in <module>
    main()
  File "/home/john/device-type-import/Device
[nb-dt-import.err.txt](https://github.com/user-attachments/files/17300195/nb-dt-import.err.txt)
[nb-dt-import.out.txt](https://github.com/user-attachments/files/17300196/nb-dt-import.out.txt)
-Type-Library-Import/./nb-dt-import.py", line 35, in main
    netbox.create_module_types(module_types)
  File "/home/john/device-type-import/Device-Type-Library-Import/netbox_api.py", line 178, in create_module_types
    self.device_types.create_module_rear_ports(curr_mt["rear-ports"], module_type_res.id)
UnboundLocalError: local variable 'module_type_res' referenced before assignment

marmalodak avatar Oct 08 '24 23:10 marmalodak

Hi @marmalodak

I would recommend posting this issue on the netbox-community/Device-Type-Library-Import repo

harryajc avatar Oct 13 '24 11:10 harryajc