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
Describe the bug
Trying to start glances as root (not matter what mode, e.g. standalone or web) causes a crash and a python stack trace to be displayed
To Reproduce
Steps to reproduce the behavior:
Start glances either as the root user directly or using sudo
Expected behaviour
Glances starts normally
Actual behaviour'
Glances crashes with this stack trace:
root@malachor:~# glances
Traceback (most recent call last):
File "/usr/local/bin/glances", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/glances/__init__.py", line 145, in main
start(config=config, args=args)
File "/usr/local/lib/python3.8/dist-packages/glances/__init__.py", line 110, in start
mode = GlancesMode(config=config, args=args)
File "/usr/local/lib/python3.8/dist-packages/glances/standalone.py", line 78, in __init__
self.stats.update()
File "/usr/local/lib/python3.8/dist-packages/glances/stats.py", line 234, in update
self._plugins[p].update()
File "/usr/local/lib/python3.8/dist-packages/glances/plugins/glances_plugin.py", line 993, in wrapper
ret = fct(self, *args, **kw)
File "/usr/local/lib/python3.8/dist-packages/glances/plugins/glances_plugin.py", line 1003, in wrapper
ret = fct(*args, **kw)
File "/usr/local/lib/python3.8/dist-packages/glances/plugins/glances_smart.py", line 155, in update
stats = get_smart_data()
File "/usr/local/lib/python3.8/dist-packages/glances/plugins/glances_smart.py", line 98, in get_smart_data
devlist = DeviceList()
File "/usr/local/lib/python3.8/dist-packages/pySMART/device_list.py", line 56, in __init__
self._initialize()
File "/usr/local/lib/python3.8/dist-packages/pySMART/device_list.py", line 95, in _initialize
cmd = Popen([SMARTCTL_PATH, '--scan-open'], stdout=PIPE, stderr=PIPE)
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1583, in _execute_child
and os.path.dirname(executable)
File "/usr/lib/python3.8/posixpath.py", line 152, in dirname
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Desktop (please complete the following information):
Describe the bug
Trying to start glances as root (not matter what mode, e.g. standalone or web) causes a crash and a python stack trace to be displayed
To Reproduce
Steps to reproduce the behavior:
Expected behaviour
Glances starts normally
Actual behaviour'
Glances crashes with this stack trace:
Desktop (please complete the following information):
OS: Pop_OS! 20.04 (Ubuntu 20.04)
Glances Version
Additional context
Python is at version 3.8.5 for both my user and the root user (not using any fancy virtual env setup)
The text was updated successfully, but these errors were encountered: