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

Running docker exec on python3.12 fails #832

Closed
matan1008 opened this issue Nov 22, 2023 · 1 comment
Closed

Running docker exec on python3.12 fails #832

matan1008 opened this issue Nov 22, 2023 · 1 comment

Comments

@matan1008
Copy link

I run the following code:

exec_ = await container.exec(command)
async with exec_.start(detach=False) as stream:
    print(await stream.read_out())
  • Expected behaviour:
    On Python 3.11 and before, the code prints the command output

  • Actual behaviour:
    On Python 3.12, the start function raises:

aiodocker.exceptions.DockerError: DockerError(500, "Cannot upgrade connection to vendored tcp protocol, the docker server has closed underlying socket. Status code: 101. Headers: <CIMultiDictProxy('Content-Type': 'application/vnd.docker.multiplexed-stream', 'Connection': 'Upgrade', 'Upgrade': 'tcp', 'Api-Version': '1.43', 'Docker-Experimental': 'false', 'Ostype': 'linux', 'Server': 'Docker/24.0.7 (linux)')>.")

How to reproduce

I tried it on several docker images, including the standard mysql build

Your environment

Ubuntu 22.04
Python 3.12
aiodocker version: 0.21.0
Docker version 24.0.7, build afdd53b

@matan1008
Copy link
Author

The issue is solved in version 3.9.1 of aiohttp

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

1 participant