-
Notifications
You must be signed in to change notification settings - Fork 105
CI failing with "cannot import name 'AnsibleCollectionLoader'" #135
Comments
Testing locally with Ansible 2.9.9 there's no issue. |
I also tested with 2.11.0.dev0 and didn't have an issue:
|
Tried with 2.9.10 and the current 2.10.0 devel too, no problems locally. ??? |
And... now I can't get the problem to reproduce on GitHub Actions, so I guess it was some weird transient issue. Closing this. |
@geerlingguy I ran into the same today randomly and had to uninstall Ansible and delete the ansible directory under site-packages. After reinstalling Ansible, I could no longer replicate the error. |
@jamesmarshall24 @geerlingguy I recently ran into it.. think the problem is somehow somewhere between the package-names 'ansible' and 'ansible-base' (in my case: installed via pip) |
Grr, I just ran into this again locally, after I was installing Ansible 2.9.10, then 2.10 pre, then ansible-base, then Ansible 2.9.10 again. The fix was as @jamesmarshall24 and @NicoWde stated:
|
- see ansible-collections/community.kubernetes#135 (comment) - workaround by not setting a version
- see ansible-collections/community.kubernetes#135 (comment) - workaround by not setting a version
- see ansible-collections/community.kubernetes#135 (comment) - workaround by not setting a version (cherry picked from commit 1fb7d3b)
There is some issue introduced with ansible 2.10 ansible-collections/community.kubernetes#135
Note, on CentOS 8, i had to change the python path to 3.6 to remove the right directory. But it fixed my issue. |
Just a note on the above, aside from also changing the python version, in Ubuntu 18.04, it's |
Yes, had to uninstall
|
I just now learned about GitHub Actions and decided to give it a try. My first action is using ansible-lint. And I now get this error message every time I push. However, ansible-lint runs fine locally and I've already corrected all issues it brought up. Is there something I need to do to correct this, or is it something that's buggy with GitHub's Actions? |
This really helped. Thank you! |
this is the correct solution. |
same problem here in ubuntu 20.04, reinstalling with pip3 worked for me :) |
Perfect. It worked. lucky, I was using it inside venv ! thank you @geerlingguy |
Good job ! |
SUMMARY
CI testing has started failing today with the error message down below.
See failed build: https://github.com/ansible-collections/community.kubernetes/runs/785830751?check_suite_focus=true#step:8:21
ISSUE TYPE
COMPONENT NAME
CI / Molecule
ANSIBLE VERSION
TODO.
CONFIGURATION
TODO.
OS / ENVIRONMENT
GitHub Actions
STEPS TO REPRODUCE
Run GitHub Actions workflow,
molecule
test:EXPECTED RESULTS
Tests pass.
ACTUAL RESULTS
Molecule tests fail:
The text was updated successfully, but these errors were encountered: