Problems with AWS IoT Code tutorial

0

I am trying to work through the example tutorial described in https://docs.aws.amazon.com/iot/latest/developerguide/connecting-to-existing-device.html

I have a Raspberry pi 3B+ and have followed the instructions to get the latest software versions.

When I try the Python example I get the following, with some details removed:
AWS libcrypto resolve: searching process and loaded modules
AWS libcrypto resolve: found static aws-lc HMAC symbols
AWS libcrypto resolve: found static aws-lc libcrypto 1.1.1 EVP_MD symbols
Connecting to xxxxx.iot.eu-west-2.amazonaws.com with client ID 'xxxx'.....
Traceback (most recent call last):
File "pubsub.py", line 132, in <module>
connect_future.result()
File "/usr/lib/python3.5/concurrent/futures/_base.py", line 398, in result
return self.__get_result()
File "/usr/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
raise self._exception
File "/home/pi/.local/lib/python3.5/site-packages/awscrt/mqtt.py", line 382, in connect
self.websocket_proxy_options
TypeError: an integer is required (got type NoneType)

When I try the Javascript tutorial I just get:
AWS libcrypto resolve: searching process and loaded modules
AWS libcrypto resolve: found static aws-lc HMAC symbols
AWS libcrypto resolve: found static aws-lc libcrypto 1.1.1 EVP_MD symbols
then straight back to the $ prompt.

Anyone got any ideas, please? I'm new to AWS and somewhat new to Python and Linux but very familiar with computers in general....

Thanks in advance
Paul

Edited by: Paul44 on May 24, 2021 7:07 AM

Paul44
asked 3 years ago362 views
1 Answer
0

Solved.

The problem was that the Raspberry pi was running Python 3.5.3, and the tutorial example needs a newer version.

In my lack of experience with this environment, I had not realised that the normal update processes would not update the Python version.

I installed Python 3.9.5 in a Virtual Environment, and the tutorial then ran as expected.

Paul44
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions