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
已提問 3 年前檢視次數 280 次
1 個回答
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
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南