Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Support Python 3.12 #404

Open
chenrui333 opened this issue Oct 15, 2023 · 1 comment · May be fixed by #405
Open

[BUG] Support Python 3.12 #404

chenrui333 opened this issue Oct 15, 2023 · 1 comment · May be fixed by #405
Assignees
Labels
bug Something isn't working

Comments

@chenrui333
Copy link

Trying to build 1.0.68 with python 3.12, but ran into some issue with the test

error build log
14/10/23 (23:09:30) | INFO: New instance of bpytop version 1.0.68 started with pid 7145
14/10/23 (23:09:30) | INFO: Loglevel set to DEBUG
14/10/23 (23:09:30) | DEBUG: Using psutil version 5.9.3
14/10/23 (23:09:30) | DEBUG: CMD: /opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop
14/10/23 (23:09:30) | ERROR: Exception while getting cpu frequency!
14/10/23 (23:09:30) | ERROR: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))
Traceback (most recent call last):
  File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3080, in _collect
    if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), \"current\"):
                                        ^^^^^^^^^^^^^^^^^
  File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.12/site-packages/psutil/__init__.py\", line 1864, in cpu_freq
    ret = _psplatform.cpu_freq()
          ^^^^^^^^^^^^^^^^^^^^^^
  File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.12/site-packages/psutil/_psosx.py\", line 179, in cpu_freq
    curr, min_, max_ = cext.cpu_freq()
                       ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))
14/10/23 (23:09:30) | ERROR: could not convert string to float: 'Error: no SMC found\
0.0'
Traceback (most recent call last):
  File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3228, in _collect_temps
    temp = max(0, round(float(subprocess.check_output(\"osx-cpu-temp\", universal_newlines=True).strip()[:-2])))

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/6521604190/job/17710389287
relates to Homebrew/homebrew-core#150975

@branchvincent
Copy link

This is actually unrelated to 3.12, but osx-cpu-temp can log errors prior to the temperature like https://github.com/lavoiesl/osx-cpu-temp/blob/1.1.0/smc.c#L71 which then bpytop fails to parse as a float

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants