tlkh/asitop

KeyError: 'STRM CODEC DCS RD'

menzHSE opened this issue · 4 comments

Hi,

thanks for your work on asitop. I am getting the following error on a MacBookPro17,1 (MacBook Pro (13-inch, M1, 2020)) running macOS 12.0.1.

sudo asitop
Password:

[1/3] Loading ASITOP

[2/3] Starting powermetrics process

[3/3] Waiting for first reading...

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/asitop/utils.py", line 21, in parse_powermetrics
bandwidth_metrics = parse_bandwidth_metrics(powermetrics_parse)
File "/opt/homebrew/lib/python3.9/site-packages/asitop/parsers.py", line 47, in parse_bandwidth_metrics
bandwidth_metrics_dict["STRM CODEC DCS RD"], bandwidth_metrics_dict["STRM CODEC DCS WR"],
KeyError: 'STRM CODEC DCS RD'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/bin/asitop", line 8, in
sys.exit(main())
File "/opt/homebrew/lib/python3.9/site-packages/asitop/asitop.py", line 118, in main
ready = get_reading()
File "/opt/homebrew/lib/python3.9/site-packages/asitop/asitop.py", line 115, in get_reading
ready = parse_powermetrics(timecode=timecode)
File "/opt/homebrew/lib/python3.9/site-packages/asitop/utils.py", line 31, in parse_powermetrics
bandwidth_metrics = parse_bandwidth_metrics(powermetrics_parse)
File "/opt/homebrew/lib/python3.9/site-packages/asitop/parsers.py", line 47, in parse_bandwidth_metrics
bandwidth_metrics_dict["STRM CODEC DCS RD"], bandwidth_metrics_dict["STRM CODEC DCS WR"],
KeyError: 'STRM CODEC DCS RD'

Any suggestions? Thanks!

tlkh commented

Yeah, I dont have any of the other M1 Macs to test on, it turns out some of the hardware counters might be unavailable, I'll try to fix it soon

If you need some help (e.g. with testing), please let me know. Happy to help!

tlkh commented

Can you try to update to 0.0.18 and see if it works?

pip install asitop --upgrade

Yes! Works :) Thanks so much!