Cdrom size error #159

Open
opened 2020-07-31 10:49:56 +02:00 by heurtel · 1 comment
heurtel commented 2020-07-31 10:49:56 +02:00 (Migrated from github.com)

Hello,

The script seem to detect cdrom as a disk but as there is no size for it, i get the following error :

Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/netbox-agent/netbox_agent/cli.py", line 48, in
main()
File "/tmp/netbox-agent/netbox_agent/cli.py", line 44, in main
return run(config)
File "/tmp/netbox-agent/netbox_agent/cli.py", line 39, in run
server.netbox_create_or_update(config)
File "/tmp/netbox-agent/netbox_agent/server.py", line 296, in netbox_create_or_update
self.inventory.create_or_update()
File "/tmp/netbox-agent/netbox_agent/inventory.py", line 447, in create_or_update
self.do_netbox_disks()
File "/tmp/netbox-agent/netbox_agent/inventory.py", line 385, in do_netbox_disks
disks = self.get_hw_disks()
File "/tmp/netbox-agent/netbox_agent/inventory.py", line 326, in get_hw_disks
d['Size'] = '{} GB'.format(int(size / 1024 / 1024 / 1024))
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

Hello, The script seem to detect cdrom as a disk but as there is no size for it, i get the following error : Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/netbox-agent/netbox_agent/cli.py", line 48, in <module> main() File "/tmp/netbox-agent/netbox_agent/cli.py", line 44, in main return run(config) File "/tmp/netbox-agent/netbox_agent/cli.py", line 39, in run server.netbox_create_or_update(config) File "/tmp/netbox-agent/netbox_agent/server.py", line 296, in netbox_create_or_update self.inventory.create_or_update() File "/tmp/netbox-agent/netbox_agent/inventory.py", line 447, in create_or_update self.do_netbox_disks() File "/tmp/netbox-agent/netbox_agent/inventory.py", line 385, in do_netbox_disks disks = self.get_hw_disks() File "/tmp/netbox-agent/netbox_agent/inventory.py", line 326, in get_hw_disks d['Size'] = '{} GB'.format(int(size / 1024 / 1024 / 1024)) TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
Solvik commented 2020-08-05 16:10:31 +02:00 (Migrated from github.com)

would you be able to give me the lshw -quiet -json output ?

thanks

would you be able to give me the `lshw -quiet -json` output ? thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DGNum/netbox-agent#159
No description provided.