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
gefragt vor 3 Jahren280 Aufrufe
1 Antwort
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
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen