Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

fix: downgrade pyyaml to 5.4.1 #5

Closed
wants to merge 1 commit into from

Conversation

abduakhatov
Copy link

@abduakhatov abduakhatov commented Feb 14, 2023

Docker Auto Labels version: 0.2.3
Python version: 3.10
Operating System: MacOS Ventura 13.1
Description
pyyaml version did match with the way it is used here

What I Did

$ docker-auto-labels docker-stack.yml 
Traceback (most recent call last):
  File "/opt/homebrew/bin/docker-auto-labels", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/docker_auto_labels/cli.py", line 25, in main
    docker_auto_labels.process(docker_file_path)
  File "/opt/homebrew/lib/python3.10/site-packages/docker_auto_labels/docker_auto_labels.py", line 82, in process
    content = get_content(file_name)
  File "/opt/homebrew/lib/python3.10/site-packages/docker_auto_labels/docker_auto_labels.py", line 16, in get_content
    return yaml.load(docker_file)
TypeError: load() missing 1 required positional argument: 'Loader'

Solution:
Installing 5.4.1 version of pyyaml solved the problem.

@abduakhatov
Copy link
Author

I think #4 this one solves same problem. But I would recommend to specify version for pyyaml anyways

@tiangolo
Copy link
Owner

Thanks! This was updated in #11

On the other hand, I deprecated this package. 😅 https://github.com/tiangolo/docker-auto-labels#deprecated-

@tiangolo tiangolo closed this Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants