-
Notifications
You must be signed in to change notification settings - Fork 336
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
ERROR! Unexpected Exception, this is probably a bug: No module named 'msrest' #186
Comments
@Akasurde Thanks for you contribution this issue. If you install ansible, of course, you also need to install his dependency package. Thank you very much! |
Another: This is may not a bug and should be closed. Thank you! |
Thanks for the explanation that this is by design. I'm happy for @Akasurde to close this issue. |
Thanks for your reply! I will close it! |
I cannot imagine what @Fred-sun is thinking: it is very broken for a Python package to not properly reference its dependencies so that they are automatically installed. Requiring the user to manually install dependencies is not an acceptable situation. This issue should be reopened. |
he is loves ms and i think he does not know how good software works ;) |
This is a joke right? How is someone new to ansible suppose to know deps need to be installed when it's not even documented? For example https://docs.ansible.com/ansible/latest/collections/azure/azcollection/azure_rm_storageaccount_module.html#ansible-collections-azure-azcollection-azure-rm-storageaccount-module just says to install using galaxy. In comparison terraform just works our of the box. |
This issue was reported right in the middle of Ansible undergoing a transition from monolithic to modular architecture. Previously all of these modules were included with the base package, but that was split out into collections primarily to uncouple the development and release cycles of collections and the core engine. https://galaxy.ansible.com/azure/azcollection If you look at the install instructions, one of the very first things is to 'pip install -r requirements-azure.txt', that is what pulls in the python dependencies. If you have recommendations on how Ansible should automatically pull in dependencies of installed collections, you can report that on the Ansible github repo, but this repo is not the right place for it since it's just a collection and is implementing the Ansible design. Also, Terraform is MUCH more limited in scope and does not have to account for all of the use cases that Ansible supports which it cannot. Because Ansible is a general purpose automation tool and not limited to infrastructure components, it naturally requires that a different and unpredictable set of dependencies will need to be installed for different use cases. They're hardly appropriate for comparison. |
Thanks for responding Paul. I genuinely was not expecting a response as this issue has been closed. In fairness I had been struggling with ansible for days based on the docs which simply states to install collection. I had no idea there was git repo with further instructions on deps. My response here was out of frustration over the time I had spent and was not meant to cause offense. I apologise if I have. It would help incrediblely if the docs were updated to say go to this github repo and install requirements first, it certainly would have saved me hours. Most of the error mesages I got when googling indicated missing packages which I then used pip to install only to be met with more missing packages. |
Understandable. It does make sense that the "NOTE" banner on the module docs should indicate that the link inside contains further instructions on dependencies. However I have no idea where that banner comes from. Since it appears in the docs for all of the collections (for instance AWS has the same message,) it looks to be coming from Ansible core. I'll raise the issue over there and see if it can be made more verbose. |
@abelal83 |
Thank you @paultaiton, really appreciate it. It should hopefully save others from the same frustration I had. |
From @kenorb on Jul 12, 2020 21:32
SUMMARY
Ansible fails with the error that module doesn't exist.
I've tried to reinstall Ansible, but it didn't help.
ISSUE TYPE
COMPONENT NAME
azure_rm
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
macOS 10.15.5
STEPS TO REPRODUCE
EXPECTED RESULTS
No errors.
ACTUAL RESULTS
Then after installing
msrest
(pip3 install msrest
), there is another error after that:WORKAROUND
This solves the issue:
However Ansible shouldn't handle installing missing modules it-self?
Copied from original issue: ansible/ansible#70586
The text was updated successfully, but these errors were encountered: