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

ValueError: invalid literal for int() with base 10: #147

Closed
SysAdminSmith opened this issue Oct 9, 2023 · 12 comments
Closed

ValueError: invalid literal for int() with base 10: #147

SysAdminSmith opened this issue Oct 9, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@SysAdminSmith
Copy link

Good evening:
I have a AMD ATI Radeon RX 6600/6600 XT/6600M running on a Debian 12 box. Previously I had had no issues with gpu-utils. Unfortunately, I did a fresh OS install and now can't get your software to work. Here are my gpu-chk readouts:

Using rickslab-gpu-utils  3.8.2 
Using python 3.11.2
           Python version OK. 
Using Linux Kernel: 6.1.0-13-amd64
           OS kernel OK. 
Using system type: systemd
           System type has been Validated. 
Using Linux distribution: Debian GNU/Linux 12 (bookworm)
           Distro has been Validated. 
amdgpu/rocm version: UNKNOWN
           rickslab-gpu-utils can still be used. 
python3 venv is installed
           python3-venv OK. 
rickslab-gpu-utils-env is NOT available
           rickslab-gpu-utils-env can be configured per User Guide. 
Virtual Environment not configured. Only required by developers.
Not in rickslab-gpu-utils-env, (Only needed if you want to duplicate development env)
           rickslab-gpu-utils-env can be activated per User Guide. 
Checking apt-key keyring:
           rickslab repository is not using apt-key keyring. 

And this is the error I get when attempting to use gpu-ls:

AMD: amdgpu/rocm version: UNKNOWN
AMD: Wattman features enabled: 0xfffd7fff
Total of 1 GPU: 1 is rw, 0 are r-only, and 0 are w-only

Traceback (most recent call last):
  File "/usr/bin/gpu-ls", line 174, in <module>
    main()
  File "/usr/bin/gpu-ls", line 149, in main
    gpu_list.read_gpu_pstates()
  File "/usr/lib/python3/dist-packages/GPUmodules/GPUmodule.py", line 2503, in read_gpu_pstates
    gpu.read_gpu_pstates()
  File "/usr/lib/python3/dist-packages/GPUmodules/GPUmodule.py", line 1236, in read_gpu_pstates
    lineitems[0] = int(re.sub(':', '', lineitems[0]))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0

Any help would be greatly appreciated; thank you!

@Ricks-Lab
Copy link
Owner

This should be fixed in the version under development now. Can you clone the repository and test it out?

@SysAdminSmith
Copy link
Author

This should be fixed in the version under development now. Can you clone the repository and test it out?

Trying now but having issues installing vext. May be because Im running python3.11.2? (my python skills are negligible)

@Ricks-Lab
Copy link
Owner

Ricks-Lab commented Oct 10, 2023

vext may not be needed. I have discovered that GtK seems to only work with the Native python version.

I have added a pip package. This will not require setting up a venv:
pip test package

Make sure all of gpu-utils packages are uninstalled.

@SysAdminSmith
Copy link
Author

Error:

Fatal error from pip prevented installation. Full pip output in file:
    /home/<domain>/<user>/.local/pipx/logs/cmd_2023-10-10_06.49.47_pip_errors.log

Some possibly relevant errors from pip install:
    ERROR: Could not find a version that satisfies the requirement rickslab-gpu-utils-3-8-3-py3-none-any-whl (from versions: none)
    ERROR: No matching distribution found for rickslab-gpu-utils-3-8-3-py3-none-any-whl

Error installing rickslab-gpu-utils-3-8-3-py3-none-any-whl.

Again, fully accept I may be python'ing wrong haha :/

@Ricks-Lab
Copy link
Owner

Ricks-Lab commented Oct 10, 2023

I have just installed it on one of my systems with no issues. It is running Ubuntu 22.04.3 LTS.

Make sure all other rickslab-gpu-utils packages are removed. Once the whl package is downloaded, in stall with the following command:

pip install rickslab_gpu_utils-3.8.3-py3-none-any.whl

Maybe you have an old version of pip which can be upgraded with the following command:

python3 -m pip install --upgrade pip

If you are on an old distro, you may need to run pip3 instead of pip.

@SysAdminSmith
Copy link
Author

SysAdminSmith commented Oct 11, 2023

Sorry for the delay, Internet went out for 24 hours (seriously).

Unfortunately, I may not be the man to assist with this as I clearly can't pip correctly.

I did ensure all other gpu_utils are uninstalled and I did upgrade pip. Further, I 'su user.root -c "sudo -S rm -v /usr/lib/python3.11/EXTERNALLY-MANAGED"' so that I could install outside of the envelope. I still got:

$ pip install /home/domain.local/user/rickslab_gpu_utils-3.8.3-py3-none-any.whl
Defaulting to user installation because normal site-packages is not writeable
Processing ./rickslab_gpu_utils-3.8.3-py3-none-any.whl
ERROR: Wheel 'rickslab-gpu-utils' located at /home/domain.local/user/rickslab_gpu_utils-3.8.3-py3-none-any.whl is invalid.

@seapoup
Copy link

seapoup commented Oct 24, 2023

I had the same issue invalid literal for int() with base 10 as mentioned in the opening post, running Debian 12, using version 3.8.0 from the Debian repository.
0xfffd7fff enabled write access and most functions, but no access to gpu-pac.
0xfff7ffff as returned by my system did not enable write access, also no access to gpu-pac.

I cloned the repository and created the venv, though installing the requirements pip3 install --no-cache-dir -r requirements-venv.txt I managed to recreate the errors for vext. The software then runs fine, but gpu-pac and some other commands require vext.

What fixed it for me was installing the replacement as written in the error message inside the venv pip3 install --no-cache-dir --use-pep517 vext. Installation of vext-gi goes fine afterwards. Also had to install numpy system-wide afterwards. gpu-pac now works with featuremask 0xfff7ffff.
Running python3.11 here. I have not touched the test package.

@Ricks-Lab
Copy link
Owner

Thanks for confirming that the current version on GitHub solves the original problem. I plan to finish testing and release a package to PyPI this weekend. I hope @seapoup and @SysAdminSmith can check it out when available. I will update here when it is released. Afterward, I will update the repository install instructions with your findings. I would like to verify if the --use-pep517 causes any other issues.

@Ricks-Lab Ricks-Lab added the bug Something isn't working label Oct 27, 2023
@Ricks-Lab
Copy link
Owner

PyPI has been updated with v3.8.3 which addresses this issue. Please check it out and let me know of any issues.

@SysAdminSmith
Copy link
Author

PyPI has been updated with v3.8.3 which addresses this issue. Please check it out and let me know of any issues.

I can confirm that this appears to have fixed issues on my host. Thank you!

@seapoup
Copy link

seapoup commented Nov 12, 2023

PyPI has been updated with v3.8.3 which addresses this issue. Please check it out and let me know of any issues.

I can confirm that this appears to have fixed issues on my host. Thank you!

I can confirm that it the PyPi package works here as well.
It works out of the box by breaking system packages: python3 -m pip install rickslab-gpu-utils --break-system-packages

If pipx is used, it complains about missing gi. python3 -m pipx install rickslab-gpu-utils, after which gi is not installed, despite it (and cairo) being installed system wide python3-gi is already the newest version (3.42.2-3+b1). I have not managed to make it work in pipx with my very limited Python knowledge.

@Ricks-Lab
Copy link
Owner

Issue fixed in v3.8.4 released to PyPI and debian package at rickslab.com.

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

No branches or pull requests

3 participants