Skip to content

sudo pip install amdgpu-fan old code #27

@ZyxerZyxani

Description

@ZyxerZyxani

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions