[BUG] PermissionError: [Errno 13] Permission denied: '/proc/diskstats' when running from snap
See original GitHub issueUpon invocation bpytop starts, displays loading screen and promptly exits with the error message:
Bpytop exited with errorcode (1). See /root/snap/bpytop/147/.config/bpytop/error.log for more information!
The log file boils down to
PermissionError: [Errno 13] Permission denied: '/proc/diskstats'
I can read /proc/diskstats as normal user (permission 444).
To Reproduce
snap install bpytop
bpytop
Expected behavior bpytop starts in all its glory
Info
- bpytop version: 1.0.42
- psutil version: 5.7.2
- PopOs 20.04, linux pop-os 5.4.0-7642-generic # 46~ 1598628707~ 20.04~ 040157c-Ubuntu
- Terminal used: bash
- Font used:?
- Python: 3.8.2
- snap: 2.47.1
- snapd: 2.47.1
- series 16
Additional context
20/10/20 (22:04:37) | ERROR: Data collection thread failed with exception: [Errno 13] Permission denied: ‘/proc/diskstats’ Traceback (most recent call last): File “/snap/bpytop/147/usr/bin/bpytop”, line 2597, in _runner collector._collect() File “/snap/bpytop/147/usr/bin/bpytop”, line 2930, in _collect io_counters = psutil.disk_io_counters(perdisk=True if SYSTEM == “Linux” else False, nowrap=True) File “/snap/bpytop/147/usr/lib/python3/dist-packages/psutil/init.py”, line 2063, in disk_io_counters rawdict = _psplatform.disk_io_counters(**kwargs) File “/snap/bpytop/147/usr/lib/python3/dist-packages/psutil/_pslinux.py”, line 1123, in disk_io_counters for entry in gen: File “/snap/bpytop/147/usr/lib/python3/dist-packages/psutil/_pslinux.py”, line 1074, in read_procfs with open_text(“%s/diskstats” % get_procfs_path()) as f: File “/snap/bpytop/147/usr/lib/python3/dist-packages/psutil/_common.py”, line 727, in open_text return open(fname, “rt”, **kwargs) PermissionError: [Errno 13] Permission denied: ‘/proc/diskstats’ 20/10/20 (22:04:37) | WARNING: Exiting with errorcode (1). Runtime 0:00:02
(try running bpytop with --debug
flag if error.log is empty)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:20 (5 by maintainers)
Top GitHub Comments
This tip from the README file fixed the issue for me:
@misieck @0nyr Read the install instructions: https://snapcraft.io/install/bpytop/ubuntu or https://github.com/aristocratos/bpytop#snap-package