netdevopsbr / netbox-proxbox

Netbox Plugin for integration between Proxmox and Netbox
Apache License 2.0
321 stars 45 forks source link

<class 'TypeError'> While full Update proxmox | Proxbox #136

Open BoxxyCore opened 11 months ago

BoxxyCore commented 11 months ago

When i try to start the full update for Proxmox i get the following message:

<class 'TypeError'>

int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Python version: 3.10.6 NetBox version: 3.5.6 image

BoxxyCore commented 11 months ago

var/log/netbox/netbox.log - Looks like:

2023-08-01 08:10:08,152 django.request ERROR: Internal Server Error: /plugins/proxbox/full_update/ Traceback (most recent call last): File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner response = get_response(request) File "/opt/netbox/venv/lib/python3.10/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.10/site-packages/django/views/generic/base.py", line 103, in view return self.dispatch(request, *args, *kwargs) File "/opt/netbox/venv/lib/python3.10/site-packages/django/contrib/auth/mixins.py", line 109, in dispatch return super().dispatch(request, args, kwargs) File "/opt/netbox/venv/lib/python3.10/site-packages/django/views/generic/base.py", line 142, in dispatch return handler(request, *args, **kwargs) File "/opt/netbox/venv/lib/python3.10/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.10/site-packages/netbox_proxbox/proxbox_api/update.py", line 434, in all node_updated = nodes(proxmox_json = px_node_each, proxmox_cluster = proxmox_cluster) File "/opt/netbox/venv/lib/python3.10/site-packages/netbox_proxbox/proxbox_api/update.py", line 392, in nodes full_update = node_full_update(netbox_node, proxmox_json, proxmox_cluster) File "/opt/netbox/venv/lib/python3.10/site-packages/netbox_proxbox/proxbox_api/update.py", line 61, in node_full_update interfaces_updated = updates.node.interfaces(netbox_node, proxmox_json) File "/opt/netbox/venv/lib/python3.10/site-packages/netbox_proxbox/proxbox_api/updates/node.py", line 104, in interfaces _ntb_iface = [{'name': iface.name, 'mtu' : int(iface.mtu), 'tagged_vlans': [int(x['vid']) for x in iface.tagged_vlans]} for iface in nb.dcim.interfaces.filter(device_id=netbox_node.id)] File "/opt/netbox/venv/lib/python3.10/site-packages/netbox_proxbox/proxbox_api/updates/node.py", line 104, in _ntb_iface = [{'name': iface.name, 'mtu' : int(iface.mtu), 'tagged_vlans': [int(x['vid']) for x in iface.tagged_vlans]} for iface in nb.dcim.interfaces.filter(device_id=netbox_node.id)] TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

nicotomio commented 4 months ago

Hello, I got the same issue here. Is there maybe a workaround ? Thanks for your help.