Skip to content

unable to use it with netbox 4.5.x #185

@Wuppi68

Description

@Wuppi68

i want to import into a fresh installation and get the following errors - ignoring HTTPS warnings:

Package devicetype-library is already installed, updating /home/ralf/Device-Type-Library-Import/repo
*** deleted 2 SSL warnings
Netbox version 4.5 found. Using new filters.
*** deleted 2 SSL warnings
  warnings.warn(
Traceback (most recent call last):
  File "/home/xxx/Device-Type-Library-Import/./nb-dt-import.py", line 54, in <module>
    main()
  File "/home/xxx/Device-Type-Library-Import/./nb-dt-import.py", line 17, in main
    netbox = NetBox(settings)
             ^^^^^^^^^^^^^^^^
  File "/home/xxx/Device-Type-Library-Import/netbox_api.py", line 31, in __init__
    self.device_types = DeviceTypes(self.netbox, self.handle, self.counter, self.ignore_ssl, self.new_filters)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xxx/Device-Type-Library-Import/netbox_api.py", line 196, in __init__
    self.existing_device_types = self.get_device_types()
                                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xxx/Device-Type-Library-Import/netbox_api.py", line 201, in get_device_types
    return {str(item): item for item in self.netbox.dcim.device_types.all()}
            ^^^^^^^^^
  File "/home/xxx/Device-Type-Library-Import/venv/lib/python3.12/site-packages/pynetbox/models/dcim.py", line 64, in __str__
    return self.model
           ^^^^^^^^^^
  File "/home/xxx/Device-Type-Library-Import/venv/lib/python3.12/site-packages/pynetbox/core/response.py", line 328, in __getattr__
    raise AttributeError('object has no attribute "{}"'.format(k))
AttributeError: object has no attribute "model"

I have tried pip3 install -r requirements.txt with no version information too --> same result

any advise?

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