GithubHelp home page GithubHelp logo

Comments (6)

ciberado avatar ciberado commented on May 31, 2024

With version 0.8.0 everything works like a charm.

from azure-iot-cli-extension.

Hazmes avatar Hazmes commented on May 31, 2024

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.

tristanbarcelon avatar tristanbarcelon commented on May 31, 2024

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.

jaryder avatar jaryder commented on May 31, 2024

This is a 100% repro in a Linux environment. :(

from azure-iot-cli-extension.

jaryder avatar jaryder commented on May 31, 2024

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.

digimaun avatar digimaun commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.