devicetype-library
devicetype-library copied to clipboard
UnboundLocalError: local variable 'module_type_res' referenced before assignment
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
Hi @marmalodak
I would recommend posting this issue on the netbox-community/Device-Type-Library-Import repo