Open i-pushkin opened 1 year ago
Just did the install and came here to research this error. I am having the same issue.
Logs from container:
127.0.0.1 - - [17/Nov/2023:13:58:32 +0000] "GET /api/virtualization/interfaces/?virtual_machine_id=625&limit=0 HTTP/1.1" 200 1281 "-" "python-requests/2.31.0"
[ERROR] too many results
127.0.0.1 - - [17/Nov/2023:13:58:32 +0000] "GET /api/virtualization/interfaces/?virtual_machine_id=625&limit=0 HTTP/1.1" 200 1281 "-" "python-requests/2.31.0"
Internal Server Error: /plugins/proxbox/full_update/
Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/contrib/auth/mixins.py", line 109, in dispatch
return super().dispatch(request, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch
return handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/netbox_proxbox/views.py", line 93, in get
"virtualmachines_table": VMUpdateResult(proxbox_api.update.all(remove_unused = True)["virtualmachines"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/netbox_proxbox/proxbox_api/update.py", line 448, in all
vm_updated = virtual_machine(proxmox_json = px_vm_each)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/netbox_proxbox/proxbox_api/update.py", line 278, in virtual_machine
full_update = vm_full_update(netbox_vm, proxmox_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/netbox_proxbox/proxbox_api/update.py", line 37, in vm_full_update
ips_updated = updates.virtual_machine.interfaces_ips(netbox_vm, proxmox_vm)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/netbox_proxbox/proxbox_api/updates/virtual_machine.py", line 396, in interfaces_ips
_mac = interface['mac_address'].lower()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'
So I fought with it for a while on clean install and already populated database - solved for me in both cases.
127.0.0.1 - - [17/Nov/2023:13:58:32 +0000] "GET /api/virtualization/interfaces/?virtual_machine_id=625&limit=0 HTTP/1.1" 200 1281 "-" "python-requests/2.31.0"
virtual_machine_id=625
- This has to be deleted in Netbox. Hope it helps
When attempting to retrieve data from the cluster, the following error is displayed
It is not quite clear how to diagnose such an error
AttributeError at /plugins/proxbox/full_update/
Request Method: | GET -- | -- https://netbox.domain.com/plugins/proxbox/full_update/ 4.1.7 AttributeError 'NoneType' object has no attribute 'lower' /opt/netbox/venv/lib/python3.10/site-packages/netbox_proxbox/proxbox_api/updates/virtual_machine.py, line 396, in interfaces_ips netbox_proxbox.views.ProxmoxFullUpdate /opt/netbox/venv/bin/python3 3.10.10 ['/opt/netbox/netbox', '/opt/netbox', '/opt/netbox/venv/bin', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/opt/netbox/venv/lib/python3.10/site-packages'] Mon, 17 Apr 2023 06:14:56 +0000My guess is that the problem is that my netbox installation already has data that is in conflict.