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

ImportError: No module named v2018_09_01.models #4722

Closed
robersantamaria opened this issue Mar 29, 2019 · 4 comments
Closed

ImportError: No module named v2018_09_01.models #4722

robersantamaria opened this issue Mar 29, 2019 · 4 comments
Labels
Compute Mgmt This issue is related to a management-plane library. Packaging

Comments

@robersantamaria
Copy link

We have fixed our requires to azure==4.0.0, but it seems that #4151 introduced some changes that affected the current 4.0.0 release in pypi. The error surfaced in

.

tests/local/lib/python2.7/site-packages/_pytest/python.py:500: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
tests/local/lib/python2.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
tests/local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:296: in load_module
    six.exec_(co, mod.__dict__)
tests/local/lib/python2.7/site-packages/six.py:709: in exec_
    exec("""exec _code_ in _globs_, _locs_""")
<string>:1: in <module>
    ???
src/tests/scenarios/azure_arm/test_linux_loadbalancer.py:23: in <module>
    from workflow.providers.microsoft_azure.azure_common import resource_manager
src/workflow/providers/__init__.py:58: in <module>
    import workflow.providers.microsoft_azure.arm
src/workflow/providers/microsoft_azure/arm.py:18: in <module>
    from workflow.providers.microsoft_azure.azure_common import resource_manager
src/workflow/providers/microsoft_azure/azure_common/resource_manager.py:30: in <module>
    from workflow.providers.microsoft_azure.azure_common import (compute_commons, compute_services_manager,
src/workflow/providers/microsoft_azure/azure_common/compute_services_manager.py:15: in <module>
    from azure.mgmt.compute import models
tests/local/lib/python2.7/site-packages/azure/mgmt/compute/models.py:10: in <module>
    from .v2018_09_01.models import *
E   ImportError: No module named v2018_09_01.models

There is a v2018_06_01 module and a v2018_09_30 module, but v2018_09_01 does not exist.

Any feedback will be appreciated.

@wandhydrant
Copy link

wandhydrant commented Mar 29, 2019

I encountered the same issue. The ImportError appears with azure-mgmt-compute 4.5.0, and all was well with 4.4.0.

(Edit: sorry, I did not see you already pinpointed the PR in question!)

@salex89
Copy link

salex89 commented Mar 29, 2019

Same issue. The quickest current fix is to set the azure-mgmt-compute version in your requirements.txt (if you use it, along with pip) to 4.4.0.

azure-mgmt-compute==4.4.0.

P.S. This is not the first time this is happening...

@lmazuel
Copy link
Member

lmazuel commented Mar 29, 2019

My mistake, I'm fixing it in:
#4730

@salex89 can you precise "This is not the first time this is happening..." with concrete examples? I don't recall this kind of issues before. Thanks.

@lmazuel lmazuel added Packaging Compute Mgmt This issue is related to a management-plane library. labels Mar 29, 2019
@lmazuel
Copy link
Member

lmazuel commented Mar 29, 2019

Hi everybody, I'm sorry from that issue. 4.5.1 is released and should solve it all. There was un unfortunate hole in our testsuite for this import (that the concept of "bugs" right, holes in tests :)). There is now a test for this specific scenario to avoid regression.

Thank you, sorry for the disturbance :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Compute Mgmt This issue is related to a management-plane library. Packaging
Projects
None yet
Development

No branches or pull requests

4 participants