Open malinoff opened 5 years ago
@malinoff Hello. This command works under window os. I will test the Darwin again.
@malinoff Could you please run the pip freeze
to share the version of msrest
and msrestazure
?
Sure, here it is (I installed azure-cli via brew):
$ /usr/local/Cellar/azure-cli/2.0.69/libexec/bin/pip freeze
adal==1.2.2
antlr4-python3-runtime==4.7.2
applicationinsights==0.11.7
argcomplete==1.10.0
asn1crypto==0.24.0
azure-batch==7.0.0
azure-cli==2.0.69
azure-cli-command-modules-nspkg==2.0.3
azure-cli-core==2.0.69
azure-cli-nspkg==3.0.4
azure-cli-telemetry==1.0.3
azure-common==1.1.23
azure-cosmos==3.1.0
azure-datalake-store==0.0.46
azure-functions-devops-build==0.0.22
azure-graphrbac==0.60.0
azure-keyvault==1.1.0
azure-mgmt-advisor==2.0.1
azure-mgmt-appconfiguration==0.1.0
azure-mgmt-applicationinsights==0.1.1
azure-mgmt-authorization==0.52.0
azure-mgmt-batch==6.0.0
azure-mgmt-batchai==2.0.0
azure-mgmt-billing==0.2.0
azure-mgmt-botservice==0.2.0
azure-mgmt-cdn==3.1.0
azure-mgmt-cognitiveservices==3.0.0
azure-mgmt-compute==5.0.0
azure-mgmt-consumption==2.0.0
azure-mgmt-containerinstance==1.5.0
azure-mgmt-containerregistry==3.0.0rc4
azure-mgmt-containerservice==5.3.0
azure-mgmt-cosmosdb==0.6.1
azure-mgmt-datalake-analytics==0.2.1
azure-mgmt-datalake-nspkg==3.0.1
azure-mgmt-datalake-store==0.5.0
azure-mgmt-datamigration==0.1.0
azure-mgmt-deploymentmanager==0.1.0
azure-mgmt-devtestlabs==2.2.0
azure-mgmt-dns==2.1.0
azure-mgmt-eventgrid==2.2.0
azure-mgmt-eventhub==2.6.0
azure-mgmt-hdinsight==1.1.0
azure-mgmt-imagebuilder==0.2.1
azure-mgmt-iotcentral==1.0.0
azure-mgmt-iothub==0.8.2
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==1.1.0
azure-mgmt-kusto==0.3.0
azure-mgmt-loganalytics==0.2.0
azure-mgmt-managedservices==1.0.0
azure-mgmt-managementgroups==0.2.0
azure-mgmt-maps==0.1.0
azure-mgmt-marketplaceordering==0.2.1
azure-mgmt-media==1.1.1
azure-mgmt-monitor==0.5.2
azure-mgmt-msi==0.2.0
azure-mgmt-netapp==0.4.0
azure-mgmt-network==3.0.0
azure-mgmt-nspkg==3.0.2
azure-mgmt-policyinsights==0.3.1
azure-mgmt-privatedns==0.1.0
azure-mgmt-rdbms==1.9.0
azure-mgmt-recoveryservices==0.1.1
azure-mgmt-recoveryservicesbackup==0.1.2
azure-mgmt-redis==6.0.0
azure-mgmt-relay==0.1.0
azure-mgmt-reservations==0.3.1
azure-mgmt-resource==2.2.0
azure-mgmt-search==2.1.0
azure-mgmt-security==0.1.0
azure-mgmt-servicebus==0.6.0
azure-mgmt-servicefabric==0.2.0
azure-mgmt-signalr==0.1.1
azure-mgmt-sql==0.12.0
azure-mgmt-sqlvirtualmachine==0.4.0
azure-mgmt-storage==4.0.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-web==0.42.0
azure-multiapi-storage==0.2.4
azure-nspkg==3.0.2
azure-storage-blob==1.5.0
azure-storage-common==1.4.2
bcrypt==3.1.7
certifi==2019.6.16
cffi==1.12.3
chardet==3.0.4
colorama==0.4.1
cryptography==2.7
fabric==2.4.0
humanfriendly==4.18
idna==2.8
invoke==1.2.0
isodate==0.6.0
javaproperties==0.5.1
Jinja2==2.10.1
jmespath==0.9.4
jsondiff==1.2.0
keyring==19.0.2
knack==0.6.3
MarkupSafe==1.1.1
mock==2.0.0
msrest==0.6.8
msrestazure==0.4.34
oauthlib==3.0.2
paramiko==2.6.0
pbr==5.4.0
portalocker==1.4.0
prompt-toolkit==1.0.16
psutil==5.6.3
pycparser==2.19
pydocumentdb==2.3.3
Pygments==2.4.2
PyJWT==1.7.1
PyNaCl==1.3.0
pyOpenSSL==19.0.0
python-dateutil==2.8.0
pytz==2019.1
PyYAML==5.1.1
requests==2.22.0
requests-oauthlib==1.2.0
scp==0.13.2
SecretStorage==3.1.1
six==1.12.0
sshtunnel==0.1.5
tabulate==0.8.3
urllib3==1.25.3
vsts==0.1.25
vsts-cd-manager==1.0.2
wcwidth==0.1.7
websocket-client==0.56.0
xmltodict==0.12.0
It seems that the version of your msrestazure is lower than requirement. msrestazure==0.6.1
Could you please re-install this library?
azure-cli has broken dependency tree graph. When installing with poetry, the latest resolvable version is 2.0.65
with the following dependencies versions:
$ poetry add azure-cli
Using version ^2.0 for azure-cli
Updating dependencies
Resolving dependencies... (164.0s)
Package operations: 185 installs, 0 updates, 0 removals
Writing lock file
- Installing certifi (2019.6.16)
- Installing chardet (3.0.4)
- Installing idna (2.6)
- Installing pycparser (2.19)
- Installing urllib3 (1.22)
- Installing asn1crypto (0.24.0)
- Installing cffi (1.12.3)
- Installing oauthlib (2.1.0)
- Installing requests (2.18.4)
- Installing six (1.11.0)
- Installing azure-nspkg (3.0.2)
- Installing cryptography (2.1.4)
- Installing enum34 (1.1.6)
- Installing isodate (0.6.0)
- Installing pyjwt (1.7.1)
- Installing python-dateutil (2.6.1)
- Installing requests-oauthlib (0.8.0)
- Installing typing (3.7.4)
- Installing adal (1.2.2)
- Installing argcomplete (1.10.0)
- Installing azure-common (1.1.23)
- Installing azure-mgmt-nspkg (3.0.2)
- Installing bcrypt (3.1.4)
- Installing colorama (0.3.9)
- Installing funcsigs (1.0.2)
- Installing jmespath (0.9.4)
- Installing markupsafe (1.0)
- Installing monotonic (1.5)
- Installing msrest (0.6.9)
- Installing pbr (5.4.2)
- Installing pyasn1 (0.4.6)
- Installing pygments (2.3.1)
- Installing pynacl (1.3.0)
- Installing pyyaml (5.1.2)
- Installing scandir (1.10.0)
- Installing tabulate (0.8.2)
- Installing applicationinsights (0.11.9)
- Installing azure-cli-nspkg (3.0.4)
- Installing azure-mgmt-datalake-nspkg (3.0.1)
- Installing azure-storage-common (1.4.2)
- Installing azure-storage-nspkg (3.1.0)
- Installing humanfriendly (4.18)
- Installing invoke (1.3.0)
- Installing jinja2 (2.10.1)
- Installing knack (0.4.1)
- Installing mock (2.0.0)
- Installing msrestazure (0.6.1)
- Installing paramiko (2.4.3)
- Installing pathlib2 (2.3.4)
- Installing pyopenssl (17.5.0)
- Installing vsts (0.1.25)
- Installing wcwidth (0.1.7)
- Installing wheel (0.30.0)
- Installing azure-batch (6.0.0)
- Installing azure-cli-command-modules-nspkg (2.0.3)
- Installing azure-cli-core (2.0.43)
- Installing azure-cosmos (3.1.1)
- Installing azure-datalake-store (0.0.34)
- Installing azure-functions-devops-build (0.0.22)
- Installing azure-graphrbac (0.60.0)
- Installing azure-keyvault (1.1.0)
- Installing azure-mgmt-advisor (2.0.1)
- Installing azure-mgmt-applicationinsights (0.1.1)
- Installing azure-mgmt-authorization (0.50.0)
- Installing azure-mgmt-batch (6.0.0)
- Installing azure-mgmt-batchai (2.0.0)
- Installing azure-mgmt-billing (0.2.0)
- Installing azure-mgmt-botservice (0.2.0)
- Installing azure-mgmt-cdn (3.1.0)
- Installing azure-mgmt-cognitiveservices (3.0.0)
- Installing azure-mgmt-compute (5.0.0)
- Installing azure-mgmt-consumption (2.0.0)
- Installing azure-mgmt-containerinstance (1.4.0)
- Installing azure-mgmt-containerregistry (2.8.0)
- Installing azure-mgmt-containerservice (5.2.0)
- Installing azure-mgmt-cosmosdb (0.6.1)
- Installing azure-mgmt-datalake-analytics (0.2.1)
- Installing azure-mgmt-datalake-store (0.5.0)
- Installing azure-mgmt-datamigration (0.1.0)
- Installing azure-mgmt-deploymentmanager (0.1.0)
- Installing azure-mgmt-devtestlabs (2.2.0)
- Installing azure-mgmt-dns (2.1.0)
- Installing azure-mgmt-eventgrid (2.2.0)
- Installing azure-mgmt-eventhub (2.6.0)
- Installing azure-mgmt-hdinsight (0.2.1)
- Installing azure-mgmt-imagebuilder (0.2.1)
- Installing azure-mgmt-iotcentral (1.0.0)
- Installing azure-mgmt-iothub (0.8.2)
- Installing azure-mgmt-iothubprovisioningservices (0.2.0)
- Installing azure-mgmt-keyvault (1.1.0)
- Installing azure-mgmt-kusto (0.3.0)
- Installing azure-mgmt-loganalytics (0.2.0)
- Installing azure-mgmt-managementgroups (0.1.0)
- Installing azure-mgmt-maps (0.1.0)
- Installing azure-mgmt-marketplaceordering (0.1.0)
- Installing azure-mgmt-media (1.1.1)
- Installing azure-mgmt-monitor (0.5.2)
- Installing azure-mgmt-msi (0.2.0)
- Installing azure-mgmt-network (3.0.0)
- Installing azure-mgmt-policyinsights (0.3.1)
- Installing azure-mgmt-privatedns (0.1.0)
- Installing azure-mgmt-rdbms (1.8.0)
- Installing azure-mgmt-recoveryservices (0.1.1)
- Installing azure-mgmt-recoveryservicesbackup (0.1.2)
- Installing azure-mgmt-redis (6.0.0)
- Installing azure-mgmt-relay (0.1.0)
- Installing azure-mgmt-reservations (0.3.1)
- Installing azure-mgmt-search (2.0.0)
- Installing azure-mgmt-security (0.1.0)
- Installing azure-mgmt-servicebus (0.6.0)
- Installing azure-mgmt-servicefabric (0.2.0)
- Installing azure-mgmt-signalr (0.1.1)
- Installing azure-mgmt-sql (0.12.0)
- Installing azure-mgmt-sqlvirtualmachine (0.3.0)
- Installing azure-mgmt-storage (3.3.0)
- Installing azure-mgmt-trafficmanager (0.51.0)
- Installing azure-mgmt-web (0.42.0)
- Installing azure-multiapi-storage (0.2.3)
- Installing azure-storage-blob (1.3.1)
- Installing fabric (2.5.0)
- Installing portalocker (1.5.1)
- Installing prompt-toolkit (1.0.16)
- Installing pytz (2019.2)
- Installing scp (0.13.2)
- Installing sshtunnel (0.1.5)
- Installing vsts-cd-manager (1.0.2)
- Installing websocket-client (0.49.0)
- Installing xmltodict (0.11.0)
- Installing azure-cli-acr (2.2.9)
- Installing azure-cli-acs (2.4.4)
- Installing azure-cli-advisor (2.0.1)
- Installing azure-cli-ams (0.4.7)
- Installing azure-cli-appservice (0.2.21)
- Installing azure-cli-backup (1.2.5)
- Installing azure-cli-batch (4.0.3)
- Installing azure-cli-batchai (0.4.10)
- Installing azure-cli-billing (0.2.2)
- Installing azure-cli-botservice (0.2.2)
- Installing azure-cli-cdn (0.2.4)
- Installing azure-cli-cloud (2.1.1)
- Installing azure-cli-cognitiveservices (0.2.6)
- Installing azure-cli-configure (2.0.24)
- Installing azure-cli-consumption (0.4.4)
- Installing azure-cli-container (0.3.18)
- Installing azure-cli-cosmosdb (0.2.11)
- Installing azure-cli-deploymentmanager (0.1.1)
- Installing azure-cli-dla (0.2.6)
- Installing azure-cli-dls (0.1.4)
- Installing azure-cli-dms (0.1.4)
- Installing azure-cli-eventgrid (0.2.4)
- Installing azure-cli-eventhubs (0.3.7)
- Installing azure-cli-extension (0.2.5)
- Installing azure-cli-feedback (2.2.1)
- Installing azure-cli-find (0.3.4)
- Installing azure-cli-hdinsight (0.3.5)
- Installing azure-cli-interactive (0.4.5)
- Installing azure-cli-iot (0.3.11)
- Installing azure-cli-iotcentral (0.1.7)
- Installing azure-cli-keyvault (2.2.16)
- Installing azure-cli-kusto (0.2.3)
- Installing azure-cli-lab (0.1.8)
- Installing azure-cli-maps (0.3.5)
- Installing azure-cli-monitor (0.2.15)
- Installing azure-cli-natgateway (0.1.1)
- Installing azure-cli-network (2.5.2)
- Installing azure-cli-policyinsights (0.1.4)
- Installing azure-cli-privatedns (1.0.2)
- Installing azure-cli-profile (2.1.5)
- Installing azure-cli-rdbms (0.3.12)
- Installing azure-cli-redis (0.4.4)
- Installing azure-cli-relay (0.1.5)
- Installing azure-cli-reservations (0.4.3)
- Installing azure-cli-resource (2.1.16)
- Installing azure-cli-role (2.6.4)
- Installing azure-cli-search (0.1.2)
- Installing azure-cli-security (0.1.2)
- Installing azure-cli-servicebus (0.3.6)
- Installing azure-cli-servicefabric (0.1.20)
- Installing azure-cli-signalr (1.0.1)
- Installing azure-cli-sql (2.2.5)
- Installing azure-cli-sqlvm (0.2.0)
- Installing azure-cli-storage (2.4.3)
- Installing azure-cli-telemetry (1.0.3)
- Installing azure-cli-vm (2.2.23)
- Installing azure-cli (2.0.65)
When trying to install a newer version in an existing poetry environment, it fails with
$ poetry add azure-cli==2.0.69
Updating dependencies
Resolving dependencies... (1.5s)
[SolverProblemError]
The current supported Python versions are 3
Because azure-cli (2.0.69) depends on javaproperties (0.5.1) which requires Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4, azure-cli is forbidden.
So, because infra depends on azure-cli (=2.0.69), version solving failed.
Installing a newer version in a new environment fails with
$ poetry add azure-cli==2.0.69
Updating dependencies
Resolving dependencies... (7.2s)
[SolverProblemError]
Because azure-cli (2.0.69) depends on azure-mgmt-containerregistry (>=3.0.0,<3.1.0) which doesn't match any versions, azure-cli is forbidden.
So, because infra depends on azure-cli (=2.0.69), version solving failed.
@yugangw-msft @zikalino Could you please take a look?
@malinoff Hello. I talked with @zikalino. I want to confirm whether your os is macOS? Now, officially, we support Homebrew for macOS. I'm not familiar with peotry
so maybe there is some knowledge gap between us we should close.
Yes, I'm on OSX (10.14.5, to be precise, but it doesn't matter - the same problem is on linux as well). poetry is a modern python packaging tool (similar to pipenv but much, much better) which includes a real dependency resolver, while pip doesn't have one. This problem is not because of homebrew, but because your giant dependency tree isn't really resolvable. Specific packages have specific requirements that cannot be satisfied. This is not a problem when installing with pip, because pip doesn't really care about versions constraints of the whole dependency tree. It will happily install the version it sees first. So for example, your package depends on C and B, package C depends on package A v1.0, package B depends on package A v2.0. If you list the requirement on C first, then A v1.0 will be installed. If you list the requirement on B first, then A v2.0 will be installed.
In the same situation, poetry
will fail with a similar ProblemSolverError
, forcing you to ensure that the whole dependency tree can be satisfied.
@malinoff I see. Thanks for your explanation. You can first try to solve the unhandled exception by upgrading the version of msrestazure. For this dependency issues, we need to discuss and figure out a correct way to fix it.
Yep, thanks for the workaround, although I don't really need it anymore - we decided not to use azure vpn gateway for reasons. The packaging issue is still a problem, though.
@MyronFanQiu why did you silently close this issue? Is the packaging problem solved?
@malinoff Truly sorry. I thought you were not care about this issue anymore. Reopen this issue to track the dependency problem.
Right, but I explicitly said that packaging is still a problem. And silently closing issues is not healthy by itself, there has to be some resolution of the problem, at least for the future readers.
@malinoff I agree. My mistake. Thanks~
I am also experiencing problems when using az network vnet-gateway vpn-client generate ...
, has there been any development on this issue?
@Iaashe Hello. Which kind of problem? Do you mean installing problem? The original issue might be caused by the version of msrestazure. Could you please check it? About install problem, @fengzhou-msft is taking a look at it.
@MyronFanQiu yes, the exact same issue as described above. I'm glad to hear that is actively being looked at.
$ pip show msrestazure
Name: msrestazure
Version: 0.6.2
Summary: AutoRest swagger generator Python client runtime. Azure-specific module.
Home-page: https://github.com/Azure/msrestazure-for-python
Author: Microsoft Corporation
Author-email: azpysdkhelp@microsoft.com
License: MIT License
Location: /usr/local/lib/python3.7/site-packages
Requires: msrest, adal
Required-by:
@laashe Hello. Do you mean that you meet same error even your version of msrestazure is 0.6.2?
@laashe Can you paste your error message and your pip freeze
result here?
@MyronFanQiu of course. Thank you for a quick reply!
$ az network vnet-gateway vpn-client generate \
--name mygw \
--processor-architecture Amd64 \
--resource-group myrg
The command failed with an unexpected error. Here is the traceback:
'str' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 603, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 661, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 654, in _run_job
six.reraise(*sys.exc_info())
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 642, in _run_job
result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 901, in __call__
result = poller.result()
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/msrest/polling/poller.py", line 183, in result
self.wait(timeout)
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/msrest/polling/poller.py", line 201, in wait
raise self._exception # type: ignore
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/msrest/polling/poller.py", line 152, in _start
self._polling_method.run()
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/msrestazure/polling/arm_polling.py", line 365, in run
self._poll()
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/msrestazure/polling/arm_polling.py", line 401, in _poll
self._operation.get_status_from_resource(self._response)
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/msrestazure/polling/arm_polling.py", line 262, in get_status_from_resource
status = self._get_provisioning_state(response)
File "/usr/local/Cellar/azure-cli/2.0.72_1/libexec/lib/python3.7/site-packages/msrestazure/polling/arm_polling.py", line 186, in _get_provisioning_state
return body.get("properties", {}).get("provisioningState")
AttributeError: 'str' object has no attribute 'get'
To open an issue, please run: 'az feedback'
$ pip freeze
adal==1.2.2
amqp==2.4.2
asn1crypto==0.24.0
billiard==3.6.0.0
camelot-py==0.7.2
celery==4.3.0
certifi==2019.9.11
cffi==1.12.3
chardet==3.0.4
Click==7.0
configparser==3.5.3
cryptography==2.7
et-xmlfile==1.0.1
excalibur-py==0.4.2
Flask==1.0.2
idna==2.8
isodate==0.6.0
itsdangerous==1.1.0
jdcal==1.4.1
Jinja2==2.10.1
kombu==4.5.0
MarkupSafe==1.1.1
msrest==0.6.10
msrestazure==0.6.2
numpy==1.16.3
oauthlib==3.1.0
opencv-python==4.1.0.25
openpyxl==2.6.2
pandas==0.24.2
pdfminer.six==20181108
pycparser==2.19
pycryptodome==3.8.1
PyJWT==1.7.1
PyPDF2==1.26.0
python-dateutil==2.8.0
pytz==2019.1
requests==2.22.0
requests-oauthlib==1.2.0
six==1.12.0
sortedcontainers==2.1.0
SQLAlchemy==1.3.3
urllib3==1.25.6
vine==1.3.0
Werkzeug==0.15.2
@fengzhou-msft, could you help take a look at this issue as it seems relate to packaging.
CLI need to support poetry package management to resolve this issue.
Describe the bug
Command Name
az network vnet-gateway vpn-client show-url
Errors:
To Reproduce:
Steps to reproduce the behavior:
az network vpn-gateway vpn-client generate -g xxx -n yyy
az network vnet-gateway vpn-client show-url -g xxx -n yyy
Expected Behavior
Don't fail with an unhandled exception.
Environment Summary
Additional Context