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

質問済み 3年前371ビュー
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.

回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ