asitop icon indicating copy to clipboard operation
asitop copied to clipboard

TypeError: 'str' object cannot be interpreted as an integer

Open aviland opened this issue 2 years ago • 5 comments

[1/3] Loading ASITOP

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/bin/asitop", line 8, in sys.exit(main()) ^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/asitop/asitop.py", line 38, in main e_core_gauges = [VGauge(val=0, color=args.color, border_color=args.color) for _ in range(e_core_count)] ^^^^^^^^^^^^^^^^^^^ TypeError: 'str' object cannot be interpreted as an integer

aviland avatar Mar 01 '23 07:03 aviland

same problem

FdyCN avatar Mar 27 '23 06:03 FdyCN

Do you really use an M1 or M2 Macbook? I tested on my Intel Macbook and the executed commands don't return the appriopriate payloads.

For me at least the second logical CPU didn't come up as well as the number of GPU Cores:

$ sysctl -a | grep hw.perflevel | grep -E 'hw.perflevel0.logicalcpu|hw.perflevel1.logicalcpu'
        hw.perflevel0.logicalcpu: 16
        hw.perflevel0.logicalcpu_max: 16
--> hw.perflevel1 missing for variable e_core_count
$ system_profiler -detailLevel basic SPDisplaysDataType | grep 'Total Number of Cores'
  -
--> missing for variable gpu_core_count

111andre111 avatar Aug 16 '23 15:08 111andre111

same problem for asitop on python3.8

whutsunxu avatar Sep 16 '23 06:09 whutsunxu

Do you really use an M1 or M2 Macbook? I tested on my Intel Macbook and the executed commands don't return the appriopriate payloads.

For me at least the second logical CPU didn't come up as well as the number of GPU Cores:

$ sysctl -a | grep hw.perflevel | grep -E 'hw.perflevel0.logicalcpu|hw.perflevel1.logicalcpu'
        hw.perflevel0.logicalcpu: 16
        hw.perflevel0.logicalcpu_max: 16
--> hw.perflevel1 missing for variable e_core_count
$ system_profiler -detailLevel basic SPDisplaysDataType | grep 'Total Number of Cores'
  -
--> missing for variable gpu_core_count

I believe this is the real reason, running asitop.py on intel chip mac will lead to e_core_count variable be '?', and this cause the problem of 'str' object cannot be interpreted as an integer

RayleighZ avatar Apr 18 '24 14:04 RayleighZ

I ran this on an old Intel Mac and got the same error, so perhaps this could be caught or checked for and reported to the user as a warning...

oliversheridanmethven avatar Jun 10 '24 15:06 oliversheridanmethven