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

Docker Container: module has no attribute #821

Closed
chrisgerdener opened this issue Jul 14, 2023 · 7 comments
Closed

Docker Container: module has no attribute #821

chrisgerdener opened this issue Jul 14, 2023 · 7 comments

Comments

@chrisgerdener
Copy link

Pretty much as the title says. Tried to use the test tool via docker container. When we try to run the IS-04 Node API test suite, we get an error stating: ERROR: module 'asyncio' has no attribute 'get_running_loop'
Happens on the latest docker image from June 28

@garethsb
Copy link
Contributor

Hmm, strange... asyncio.get_running_loop has been around since 3.7. Will investigate.

@garethsb
Copy link
Contributor

Are you building the container locally from the Dockerfile, or using the pre-built container image published at Docker Hub?

@garethsb
Copy link
Contributor

Hmm, strange... asyncio.get_running_loop has been around since 3.7. Will investigate.

Oh. Well. That's probably it. Dockerfile says FROM ubuntu:bionic which is 18.04, which shipped with Python 3.6. And that is indeed our claimed oldest supported version in Dependencies.

Since we don't directly call asyncio.get_running_loop I assume one of our unpinned dependencies in requirements.txt does, which means it inadvertently bumped our minimum requirement.

I'd like to find out which... but also not against bumping our minimum Python requirement and building the Docker image FROM ubuntu:focal (20.04). Bionic (18.04) is end of life already.

@chrisgerdener
Copy link
Author

Are you building the container locally from the Dockerfile, or using the pre-built container image published at Docker Hub?

We pulled the latest prebuilt image from docker hub according to the install instructions.

@duncwebb
Copy link

Hmm, strange... asyncio.get_running_loop has been around since 3.7. Will investigate.

Oh. Well. That's probably it. Dockerfile says FROM ubuntu:bionic which is 18.04, which shipped with Python 3.6. And that is indeed our claimed oldest supported version in Dependencies.

Since we don't directly call asyncio.get_running_loop I assume one of our unpinned dependencies in requirements.txt does, which means it inadvertently bumped our minimum requirement.

I'd like to find out which... but also not against bumping our minimum Python requirement and building the Docker image FROM ubuntu:focal (20.04). Bionic (18.04) is end of life already.

Looking in the container I think it's zeroconf that's causing the problem (the 0.38.4 revision it has installed claims a requirement on CPython 3.7+). When it was pulled in as dependency of zeroconf-monkey it was at 0.28.5 which didn't make any calls to asyncio.get_running_loop (0.32.0 was the first to use this). I think claim of CPython 3.6+ in the README.md in 0.32.0 is a mistake. Python 3.6 has been EoL for over a year now - is there a requirement to support it still?

@garethsb
Copy link
Contributor

I agree (see also #830). I'll bump minimum python to 3.7 as part of #829.

@garethsb
Copy link
Contributor

Resolved by #829

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

3 participants