1

I've been following the tutorial at https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-python-module

On my development machine, the python lint in Visual Studio Code is reporting the error: E0401:Unable to import 'iothub_client' on main.py.

I wonder if I'm missing a pre-requisite step, or is this just an advisory that can be ignored on the development side of things and it should be ok once deployed - or do I need to fix this error on the development machine first?

I've successfully run the previous tutorial and have tempSensor running. filterSensor seems to terminate and go into a "backoff" state once deployed, with an error of 1. I don't know how I can find out on the Edge-side why it is failing - how do I go about debugging this? Can I see print statement output anywhere, for example?

I'm developing on Mac, and deploying to a Beaglebone running Ubuntu 16.04 LTS.

  • I see you opened [an issue](https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-python-module#feedback) at the document and it is already assigned. – Rita Han May 18 '18 at 05:56

1 Answers1

0

For the Python lint issue, yes you are right that this information is just advisory. The cause for it showing up is that you did not install Azure IoT Python SDK which is a pip package on your development machine. You can safely ignore it because the SDK will be installed when building the module image (there is a RUN pip install -r requirements.txt step in the Dockerfile).

If you want to resolve this lint information, you can install the SDK on your development machine manually by running pip install -r requirements.txt in the root folder of the module.

LazarusX
  • 2,735
  • 2
  • 22
  • 30