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

compose.config fails with docker compose v2.25.0 #569

Closed
HemaZ opened this issue Mar 20, 2024 · 3 comments
Closed

compose.config fails with docker compose v2.25.0 #569

HemaZ opened this issue Mar 20, 2024 · 3 comments

Comments

@HemaZ
Copy link
Contributor

HemaZ commented Mar 20, 2024

Hello,

It seems calling DockerCompose.config now fails with dokcer compose v2.25.0

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ibrahim/lib/python3.10/site-packages/python_on_whales/components/compose/cli_wrapper.py", line 137, in config
    return ComposeConfig(**json.loads(result))
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

i found a releated issue on docker compose repo

docker/compose#11627

it seems that docker compose config ignore --format arg unless --no-interpolate is passed.

so

docker compose -f docker-compose.yaml config --format=json will output yaml

docker compose -f docker-compose.yaml config --format=json --no-interpolate will output json

@gabrieldemarmiesse
Copy link
Owner

Hi, thanks for the bug report, it seems it was fixed in docker compose: docker/compose#11630 We should wait until the new release to see if it works

@HemaZ
Copy link
Contributor Author

HemaZ commented Apr 18, 2024

i just upgraded docker compose version v2.26.1 and this is now fixed. closing this issue. sorry for the noise.

@HemaZ HemaZ closed this as completed Apr 18, 2024
@gabrieldemarmiesse
Copy link
Owner

No worries, I think opening this issue helped people who got the same bug :)

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

2 participants