Comments (6)
With version 0.8.0 everything works like a charm.
from azure-iot-cli-extension.
I had the same thing happening to me in an automated azure DevOps pipeline.
The Azure IoT Edge Task is failing with the exact same stacktrace:
2019-09-18T11:41:25.8579136Z ERROR: The command failed with an unexpected error. Here is the traceback:
2019-09-18T11:41:25.8580125Z
2019-09-18T11:41:25.9098840Z ERROR: The 'jsonschema' distribution was not found and is required by the application
2019-09-18T11:41:25.9099863Z Traceback (most recent call last):
2019-09-18T11:41:25.9100514Z File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
2019-09-18T11:41:25.9100656Z cmd_result = self.invocation.execute(args)
2019-09-18T11:41:25.9100963Z File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 603, in execute
2019-09-18T11:41:25.9101293Z raise ex
2019-09-18T11:41:25.9101579Z File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 661, in _run_jobs_serially
2019-09-18T11:41:25.9101647Z results.append(self._run_job(expanded_arg, cmd_copy))
2019-09-18T11:41:25.9102125Z File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in _run_job
2019-09-18T11:41:25.9102187Z six.reraise(*sys.exc_info())
2019-09-18T11:41:25.9102466Z File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
2019-09-18T11:41:25.9102527Z raise value
2019-09-18T11:41:25.9102847Z File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 631, in _run_job
2019-09-18T11:41:25.9103146Z result = cmd_copy(params)
2019-09-18T11:41:25.9103404Z File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 305, in __call__
2019-09-18T11:41:25.9103514Z return self.handler(*args, **kwargs)
2019-09-18T11:41:25.9104337Z File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 485, in default_command_handler
2019-09-18T11:41:25.9104480Z return op(**command_args)
2019-09-18T11:41:25.9104824Z File "/home/vsts/.azure/cliextensions/azure-cli-iot-ext/azext_iot/operations/hub.py", line 524, in iot_edge_deployment_create
2019-09-18T11:41:25.9104955Z login=login, edge=True)
2019-09-18T11:41:25.9105296Z File "/home/vsts/.azure/cliextensions/azure-cli-iot-ext/azext_iot/operations/hub.py", line 558, in _iot_hub_configuration_create
2019-09-18T11:41:25.9105647Z content = _process_config_content(content, 'module' if edge else 'device')
2019-09-18T11:41:25.9105995Z File "/home/vsts/.azure/cliextensions/azure-cli-iot-ext/azext_iot/operations/hub.py", line 613, in _process_config_content
2019-09-18T11:41:25.9106075Z _validate_payload_schema(content)
2019-09-18T11:41:25.9106464Z File "/home/vsts/.azure/cliextensions/azure-cli-iot-ext/azext_iot/operations/hub.py", line 626, in _validate_payload_schema
2019-09-18T11:41:25.9106875Z from jsonschema import validate
2019-09-18T11:41:25.9107311Z File "/home/vsts/.azure/cliextensions/azure-cli-iot-ext/jsonschema/__init__.py", line 33, in <module>
2019-09-18T11:41:25.9107390Z __version__ = get_distribution(__name__).version
2019-09-18T11:41:25.9108085Z File "/opt/az/lib/python3.6/site-packages/pkg_resources/__init__.py", line 472, in get_distribution
2019-09-18T11:41:25.9108153Z dist = get_provider(dist)
2019-09-18T11:41:25.9108413Z File "/opt/az/lib/python3.6/site-packages/pkg_resources/__init__.py", line 344, in get_provider
2019-09-18T11:41:25.9108534Z return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
2019-09-18T11:41:25.9108797Z File "/opt/az/lib/python3.6/site-packages/pkg_resources/__init__.py", line 892, in require
2019-09-18T11:41:25.9108910Z needed = self.resolve(parse_requirements(requirements))
2019-09-18T11:41:25.9109169Z File "/opt/az/lib/python3.6/site-packages/pkg_resources/__init__.py", line 778, in resolve
2019-09-18T11:41:25.9109434Z raise DistributionNotFound(req, requirers)
2019-09-18T11:41:25.9109744Z pkg_resources.DistributionNotFound: The 'jsonschema' distribution was not found and is required by the application
from azure-iot-cli-extension.
I'm getting the same error with iot edge deploy task running on Azure VS2017 hosted agent.
2019-09-18T10:18:41.8898408Z ERROR: The 'jsonschema' distribution was not found and is required by the application
2019-09-18T10:18:41.8898990Z Traceback (most recent call last):
2019-09-18T10:18:41.8899388Z File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\knack\knack\cli.py", line 206, in invoke
2019-09-18T10:18:41.8899804Z File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 603, in execute
2019-09-18T10:18:41.8900242Z File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 661, in _run_jobs_serially
2019-09-18T10:18:41.8900631Z File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 654, in _run_job
2019-09-18T10:18:41.8901222Z File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\six\six.py", line 693, in reraise
2019-09-18T10:18:41.8901619Z File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 631, in _run_job
2019-09-18T10:18:41.8902357Z File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 305, in __call__
2019-09-18T10:18:41.8902812Z File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\__init__.py", line 485, in default_command_handler
2019-09-18T10:18:41.8903309Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-cli-iot-ext\azext_iot\operations\hub.py", line 524, in iot_edge_deployment_create
2019-09-18T10:18:41.8903727Z login=login, edge=True)
2019-09-18T10:18:41.8904167Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-cli-iot-ext\azext_iot\operations\hub.py", line 558, in _iot_hub_configuration_create
2019-09-18T10:18:41.8904585Z content = _process_config_content(content, 'module' if edge else 'device')
2019-09-18T10:18:41.8905039Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-cli-iot-ext\azext_iot\operations\hub.py", line 613, in _process_config_content
2019-09-18T10:18:41.8905641Z _validate_payload_schema(content)
2019-09-18T10:18:41.8906203Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-cli-iot-ext\azext_iot\operations\hub.py", line 626, in _validate_payload_schema
2019-09-18T10:18:41.8908530Z from jsonschema import validate
2019-09-18T10:18:41.8909016Z File "C:\Program Files\Common Files\AzureCliExtensionDirectory\azure-cli-iot-ext\jsonschema\__init__.py", line 33, in <module>
2019-09-18T10:18:41.8909404Z __version__ = get_distribution(__name__).version
2019-09-18T10:18:41.8909814Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\lib\site-packages\pkg_resources\__init__.py", line 472, in get_distribution
2019-09-18T10:18:41.8910207Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\lib\site-packages\pkg_resources\__init__.py", line 344, in get_provider
2019-09-18T10:18:41.8910773Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\lib\site-packages\pkg_resources\__init__.py", line 892, in require
2019-09-18T10:18:41.8911766Z File "D:\a\1\s\build_scripts\windows\artifacts\cli\lib\site-packages\pkg_resources\__init__.py", line 778, in resolve
2019-09-18T10:18:41.8912502Z pkg_resources.DistributionNotFound: The 'jsonschema' distribution was not found and is required by the application
Was this issue caused by premature inclusion of fixes for issue 84?
from azure-iot-cli-extension.
This is a 100% repro in a Linux environment. :(
from azure-iot-cli-extension.
You can unblock yourself by using the following to install v0.8.0 azure-cli-iot-ext (be sure to remove the extension first if it's already installed):
az extension add --source https://github.com/Azure/azure-iot-cli-extension/releases/download/v0.8.0/azure_cli_iot_ext-0.8.0-py2.py3-none-any.whl
from azure-iot-cli-extension.
The CLI extension index update for v0.8.2 (which should resolve this issue) was merged Sept 20th 2019, 4:36 PM EDT.
Going to close this issue. Please reopen if still a problem.
from azure-iot-cli-extension.
Related Issues (20)
- event hub monitor issue HOT 6
- Cannot Add Azure IoT Extension HOT 4
- Unable to run az extension for azure-iot in centos 7 HOT 1
- az iot hub monitor command fials HOT 3
- MAC os Compile?
- az iot du update stage fail HOT 2
- az iot hub monitor --login fails HOT 11
- [bug] Test
- [bug] IotCentral integration test failing trying execute app show -n {} command when test configuration has app id HOT 4
- How to create new iot hub with new TLS certificate root? HOT 3
- Latest version does not work with the minimum requirements of the Azure CLI version HOT 2
- [bug] az iot central diagnostics stops tracking events after a while HOT 4
- az iot hub device-identity create issues HOT 3
- [bug] az iot device send-d2c-message doesn't allow for different data formats, only utf-8 HOT 2
- [bug] CLI fails when trying to delete a message-endpoint HOT 3
- [bug] list device-twins error: 'list' is misspelled HOT 2
- [bug] az iot hub monitor-events -n {iothub_name} is not working HOT 11
- [bug] az iot hub state export fails with unexpected error, traceback: 'resourceGroup' HOT 3
- [Technical Question] Create Azure IoT Hub with turned-on preview mode HOT 2
- IoT Hub Device Twin Replace does not allow `null` values HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-iot-cli-extension.