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

podman-compose should throw a readable error on too old python #982

Open
jsayer101 opened this issue Jul 1, 2024 · 2 comments
Open

podman-compose should throw a readable error on too old python #982

jsayer101 opened this issue Jul 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jsayer101
Copy link

jsayer101 commented Jul 1, 2024

Describe the bug

Same issue as closed #862. We try to run podman-compose with Python 3.6.8

Traceback (most recent call last):
  File "/usr/local/bin/podman-compose", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/podman_compose.py", line 3504, in main
    asyncio.run(async_main())
AttributeError: module 'asyncio' has no attribute 'run'

To Reproduce
On RHEL8X / Python 3.6.8

$ sudo -H pip3 install --upgrade pip
$ sudo pip3 install podman-compose 

$ podman-compose --version

Expected behavior
Works...

Actual behavior
Got an error

Output

$ podman-compose version

Traceback (most recent call last):
  File "/usr/local/bin/podman-compose", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/podman_compose.py", line 3504, in main
    asyncio.run(async_main())
AttributeError: module 'asyncio' has no attribute 'run'
$ podman-compose up

Traceback (most recent call last):
  File "/usr/local/bin/podman-compose", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/podman_compose.py", line 3504, in main
    asyncio.run(async_main())
AttributeError: module 'asyncio' has no attribute 'run'

Environment:

  • OS: RHEL 8X
  • podman version: 4.9.4-rhel
  • podman compose version:
$ pip show podman-compose
Name: podman-compose
Version: 1.2.0
Summary: A script to run docker-compose.yml using podman

More infos
We have RHEL8X systems that works well with Python 3.6.8 and

podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.6.1
podman-compose version 1.0.6
podman --version
podman version 4.6.1
exit code: 0
@jsayer101 jsayer101 added the bug Something isn't working label Jul 1, 2024
@jsayer101
Copy link
Author

jsayer101 commented Jul 1, 2024

Tested with latest devel, same result.

Actual workaround... Use v1.0.6. (Works well)

pip3 install https://github.com/containers/podman-compose/archive/v1.0.6.tar.gz

@p12tic
Copy link
Collaborator

p12tic commented Jul 1, 2024

Thanks for opening this bug. Python 3.6 is no longer supported on latest releases. The recommended solution is to use v1.0.6.

I'm not closing the issue because the current behavior is quite confusing. podman-compose should refuse to run and throw a descriptive error if the version of Python is too old.

@p12tic p12tic changed the title AttributeError: module 'asyncio' has no attribute 'run' podman-compose should throw a readable error on too old python Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants