You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "ipscan.py", line 44, in
netbox.ipam.create_ip_address(str(ipaddress))
File "/home/ec2-admin/.local/lib/python3.8/site-packages/netbox/ipam.py", line 62, in create_ip_address
return self.netbox_con.post('/ipam/ip-addresses/', required_fields, **kwargs)
File "/home/ec2-admin/.local/lib/python3.8/site-packages/netbox/connection.py", line 129, in post
raise exceptions.CreateException(resp_data)
File "/home/ec2-admin/.local/lib/python3.8/site-packages/netbox/exceptions.py", line 36, in init
self.err = ''.join('{} '.format(val[0]) for key, val in resp_data.items())
File "/home/ec2-admin/.local/lib/python3.8/site-packages/netbox/exceptions.py", line 36, in
self.err = ''.join('{} '.format(val[0]) for key, val in resp_data.items())
TypeError: 'int' object is not subscriptable
$ pip install python-netbox
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: python-netbox in /home/ec2-admin/.local/lib/python3.8/site-packages (0.0.18)
Requirement already satisfied: ipaddress in /home/ec2-admin/.local/lib/python3.8/site-packages (from python-netbox) (1.0.23)
Requirement already satisfied: requests in /home/ec2-admin/.local/lib/python3.8/site-packages (from python-netbox) (2.23.0)
Requirement already satisfied: chardet<4,>=3.0.2 in /home/ec2-admin/.local/lib/python3.8/site-packages (from requests->python-netbox) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/ec2-admin/.local/lib/python3.8/site-packages (from requests->python-netbox) (1.25.9)
Requirement already satisfied: idna<3,>=2.5 in /home/ec2-admin/.local/lib/python3.8/site-packages (from requests->python-netbox) (2.9)
Requirement already satisfied: certifi>=2017.4.17 in /home/ec2-admin/.local/lib/python3.8/site-packages (from requests->python-netbox) (2020.4.5.1)
The text was updated successfully, but these errors were encountered:
You found a bug in the exception handling. Unfortunately I cannot reproduce this error. I'll refactor the exception so that you receive more useful information from netbox.
netbox.ipam.create_ip_address(str(ipaddress))
File "ipscan.py", line 44, in
netbox.ipam.create_ip_address(str(ipaddress))
File "/home/ec2-admin/.local/lib/python3.8/site-packages/netbox/ipam.py", line 62, in create_ip_address
return self.netbox_con.post('/ipam/ip-addresses/', required_fields, **kwargs)
File "/home/ec2-admin/.local/lib/python3.8/site-packages/netbox/connection.py", line 129, in post
raise exceptions.CreateException(resp_data)
File "/home/ec2-admin/.local/lib/python3.8/site-packages/netbox/exceptions.py", line 36, in init
self.err = ''.join('{} '.format(val[0]) for key, val in resp_data.items())
File "/home/ec2-admin/.local/lib/python3.8/site-packages/netbox/exceptions.py", line 36, in
self.err = ''.join('{} '.format(val[0]) for key, val in resp_data.items())
TypeError: 'int' object is not subscriptable
$ pip install python-netbox
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: python-netbox in /home/ec2-admin/.local/lib/python3.8/site-packages (0.0.18)
Requirement already satisfied: ipaddress in /home/ec2-admin/.local/lib/python3.8/site-packages (from python-netbox) (1.0.23)
Requirement already satisfied: requests in /home/ec2-admin/.local/lib/python3.8/site-packages (from python-netbox) (2.23.0)
Requirement already satisfied: chardet<4,>=3.0.2 in /home/ec2-admin/.local/lib/python3.8/site-packages (from requests->python-netbox) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/ec2-admin/.local/lib/python3.8/site-packages (from requests->python-netbox) (1.25.9)
Requirement already satisfied: idna<3,>=2.5 in /home/ec2-admin/.local/lib/python3.8/site-packages (from requests->python-netbox) (2.9)
Requirement already satisfied: certifi>=2017.4.17 in /home/ec2-admin/.local/lib/python3.8/site-packages (from requests->python-netbox) (2020.4.5.1)
The text was updated successfully, but these errors were encountered: