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

iotedgedev in Azure DevOps pipeline fails - ImportError: No module named configparser #426

Closed
adriandiver opened this issue Mar 31, 2020 · 2 comments
Labels

Comments

@adriandiver
Copy link

Hi,

I setup a simple IoT Edge DevOps Project through the Azure Portal (Python). The pipelines worked well until yesterday and now the pipeline fails during the step "Azure IoT Edge - Build module images". Based on the output it seems there is an issue with configparser:

##[debug]which 'iotedgedev'
##[debug]found: '/usr/local/bin/iotedgedev'
##[debug]which 'iotedgedev'
##[debug]found: '/usr/local/bin/iotedgedev'
##[debug]/usr/local/bin/iotedgedev arg: --version
##[debug]/usr/local/bin/iotedgedev arg: --version
##[debug]exec tool: /usr/local/bin/iotedgedev
##[debug]exec tool: /usr/local/bin/iotedgedev
##[debug]arguments:
##[debug]arguments:
##[debug] --version
##[debug] --version
##[debug]
##[error]Traceback (most recent call last):
File "/usr/local/bin/iotedgedev", line 7, in
from iotedgedev.cli import main
File "/usr/local/lib/python2.7/dist-packages/iotedgedev/cli.py", line 12, in
from .azurecli import AzureCli
File "/usr/local/lib/python2.7/dist-packages/iotedgedev/azurecli.py", line 9, in
from azure.cli.core import get_default_cli
File "/usr/local/lib/python2.7/dist-packages/azure/cli/core/init.py", line 24, in
from .local_context import AzCLILocalContext, STORE
File "/usr/local/lib/python2.7/dist-packages/azure/cli/core/local_context.py", line 9, in
import configparser
ImportError: No module named configparser

I even tried to install an older version of iotedgedev but it still fails.

Steps to Reproduce:

  1. Deploy Azure DevOps project through Azure Portal (IoT Edge, Python)
  2. Run the Pipeline
@mrtncls
Copy link

mrtncls commented Apr 1, 2020

Hello,

I want to report the same issue.

Starting from yesterday, we see that iotedgedev fails to install with message "ImportError: No module named configparser".

Task output since yesterday
2020-04-01T06:51:21.0303370Z ##[section]Starting: Azure IoT Edge - Generate deployment manifest
2020-04-01T06:51:21.0311591Z ==============================================================================
2020-04-01T06:51:21.0311949Z Task         : Azure IoT Edge
2020-04-01T06:51:21.0312399Z Description  : Build and deploy an Azure IoT Edge image
2020-04-01T06:51:21.0312680Z Version      : 2.3.0
2020-04-01T06:51:21.0312915Z Author       : Microsoft Corporation
2020-04-01T06:51:21.0313522Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/azure-iot-edge
2020-04-01T06:51:21.0313939Z ==============================================================================
2020-04-01T06:51:21.9034670Z Start generating deployment manifest...
2020-04-01T06:51:21.9035600Z /home/vsts/work/r1/a/DeploymentDrop/windows/CapaCT.Edge /home/vsts/work/r1/a
2020-04-01T06:52:03.3464144Z ##[error]Traceback (most recent call last):
  File "/usr/local/bin/iotedgedev", line 7, in <module>
    from iotedgedev.cli import main
  File "/usr/local/lib/python2.7/dist-packages/iotedgedev/cli.py", line 12, in <module>
    from .azurecli import AzureCli
  File "/usr/local/lib/python2.7/dist-packages/iotedgedev/azurecli.py", line 9, in <module>
    from azure.cli.core import get_default_cli
  File "/usr/local/lib/python2.7/dist-packages/azure/cli/core/__init__.py", line 24, in <module>
    from .local_context import AzCLILocalContext, STORE
  File "/usr/local/lib/python2.7/dist-packages/azure/cli/core/local_context.py", line 9, in <module>
    import configparser
ImportError: No module named configparser

2020-04-01T06:52:03.3476824Z ##[error]Error: iotedgedev installation failed, see detailed error in debug mode
2020-04-01T06:53:03.5865278Z ##[section]Finishing: Azure IoT Edge - Generate deployment manifest
Task output before yesterday
2020-03-30T10:52:16.3662959Z ##[section]Starting: Azure IoT Edge - Generate deployment manifest
2020-03-30T10:52:16.3669494Z ==============================================================================
2020-03-30T10:52:16.3669827Z Task         : Azure IoT Edge
2020-03-30T10:52:16.3670265Z Description  : Build and deploy an Azure IoT Edge image
2020-03-30T10:52:16.3670522Z Version      : 2.3.0
2020-03-30T10:52:16.3670758Z Author       : Microsoft Corporation
2020-03-30T10:52:16.3671418Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/azure-iot-edge
2020-03-30T10:52:16.3671767Z ==============================================================================
2020-03-30T10:52:16.6231155Z Start generating deployment manifest...
2020-03-30T10:52:16.6234031Z /home/vsts/work/r1/a/DeploymentDrop/windows/CapaCT.Edge /home/vsts/work/r1/a
2020-03-30T10:52:49.6343465Z iotedgedev installed with version: version 2.1.3
2020-03-30T10:52:49.6343974Z 
2020-03-30T10:52:49.6475621Z [command]/usr/local/bin/iotedgedev genconfig --file /home/vsts/work/r1/a/DeploymentDrop/windows/CapaCT.Edge/deployment.template.json --platform windows-amd64
2020-03-30T10:52:49.9021739Z 
2020-03-30T10:52:49.9022533Z =======================================
2020-03-30T10:52:49.9023062Z ======== ENVIRONMENT VARIABLES ========
2020-03-30T10:52:49.9023465Z =======================================
2020-03-30T10:52:49.9023807Z 
2020-03-30T10:52:49.9024349Z .env file not found on disk. Without a file on disk, you must specify all Environment Variables at the system level. (/home/vsts/work/r1/a/DeploymentDrop/windows/CapaCT.Edge/.env)
2020-03-30T10:52:49.9127991Z 
2020-03-30T10:52:49.9128565Z Welcome to iotedgedev!
2020-03-30T10:52:49.9129742Z -------------------------
2020-03-30T10:52:49.9130352Z Telemetry
2020-03-30T10:52:49.9130886Z ---------
2020-03-30T10:52:49.9131350Z The iotedgedev collects usage data in order to improve your experience.
2020-03-30T10:52:49.9131866Z The data is anonymous and does not include commandline argument values.
2020-03-30T10:52:49.9132358Z The data is collected by Microsoft.
2020-03-30T10:52:49.9132671Z 
2020-03-30T10:52:49.9133416Z You can change your telemetry settings by updating 'collect_telemetry' to 'no' in /home/vsts/.iotedgedev/setting.ini
2020-03-30T10:52:49.9133906Z 
2020-03-30T10:52:49.9135855Z Expanding image placeholders
2020-03-30T10:52:49.9138199Z Converting createOptions
2020-03-30T10:52:49.9143124Z Deleting template schema version
2020-03-30T10:52:49.9146373Z Expanding 'deployment.template.json' to '/home/vsts/work/r1/a/deployment.json'
2020-03-30T10:52:49.9153413Z Validating generated deployment manifest /home/vsts/work/r1/a/deployment.json
2020-03-30T10:52:50.3823827Z Validating schema of deployment manifest.
2020-03-30T10:52:50.3856302Z Deployment manifest schema validation passed.
2020-03-30T10:52:50.3859261Z Start validating createOptions for all modules.
2020-03-30T10:52:50.3859672Z Validating createOptions for module ParkingBrain
2020-03-30T10:52:50.3860046Z createOptions of module ParkingBrain validation passed
2020-03-30T10:52:50.3860451Z Validating createOptions for module edgeAgent
2020-03-30T10:52:50.3860914Z createOptions of module edgeAgent validation passed
2020-03-30T10:52:50.3861177Z Validating createOptions for module edgeHub
2020-03-30T10:52:50.3861633Z createOptions of module edgeHub validation passed
2020-03-30T10:52:50.3862141Z Validation for all createOptions passed.
2020-03-30T10:52:50.9298466Z Finished generating deployment manifest.
2020-03-30T10:53:51.2921869Z ##[section]Finishing: Azure IoT Edge - Generate deployment manifest

@blackchoey
Copy link
Collaborator

This error is caused by a dependency of iotedgedev and iotedgedev 2.1.4 is published to fix this issue. Please rerun your pipelines and let us know if you still meet errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants