TypeError: list indices must be integers or slices, not str #183
Labels
No labels
help wanted
need testing
status: accepted
status: discussing
type: bug
type: documentation
type: duplicate
type: enhancement
type:hardware
type: invalid
type: major feature
type: minor feature
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: DGNum/netbox-agent#183
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello!
Trying this out and getting errors when updating inventory, see below:
DEBUG:urllib3.connectionpool:https://netbox.xxxx:443 "GET /api/dcim/devices/?serial=C07JFKYXXX HTTP/1.1" 200 1085
Traceback (most recent call last):
File "/usr/local/bin/netbox_agent", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/cli.py", line 44, in main
return run(config)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/cli.py", line 39, in run
server.netbox_create_or_update(config)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/server.py", line 295, in netbox_create_or_update
self.inventory = Inventory(server=self)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/inventory.py", line 56, in init
self.lshw = LSHW()
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/lshw.py", line 25, in init
self.vendor = self.hw_info["vendor"]
TypeError: list indices must be integers or slices, not str
For reference this is a macmini running ubuntu 20.04,
There also seems to be a type error in the exampel yaml, if you run it through a validator you get:
(): could not find expected ':' while scanning a simple key at line 28 column 1 removing line 28 solves the issue.
Fixed by #202