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

sudo pip install amdgpu-fan old code #27

Open
ZyxerZyxani opened this issue Mar 1, 2022 · 2 comments
Open

sudo pip install amdgpu-fan old code #27

ZyxerZyxani opened this issue Mar 1, 2022 · 2 comments

Comments

@ZyxerZyxani
Copy link

The pip package/library when installed uses old code that has not changed the yaml.load(f) part to yaml.safe_load(f), thus all installs using new libraries will get error when trying to run sudo amdgpu-fan after sudo pip3 install amdgpu-fan.

yaml.load(f) expects another argument in newer version, and thus throws error.

Traceback (most recent call last):
  File "/usr/bin/amdgpu-fan", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/amdgpu_fan/controller.py", line 67, in main
    config = load_config(location)
  File "/usr/lib/python3.10/site-packages/amdgpu_fan/controller.py", line 44, in load_config
    return yaml.load(f)
TypeError: load() missing 1 required positional argument: 'Loader'

Changing that line to yaml.safe_load(f) made it work for me

@akrenz
Copy link

akrenz commented Jun 28, 2022

Not just installing the package fails, but you also cannot run amdgpu-fan on systems with an updated package. Tested this on openSUSE Tumbleweed 20220623. changing yaml.load(f) to yaml.safe_load(f) also fixed it for me.

@MekayelAnik
Copy link

After solving the issue by changing yaml.load(f) to yaml.safe_load(f), the issue reappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants