AttributeError: 'InternalAsyncMqttClient' object has no attribute '_endpoint_provider'. Did you mean: 'set_endpoint_provider'? #323
-
I'm trying to use shadow functionality for IoT core
Failure
|
Beta Was this translation helpful? Give feedback.
Answered by
TwistedTwigleg
May 17, 2023
Replies: 1 comment
-
@github-actions proposed-answer In your case, I think can you adjust your code to the following: import boto3
import json
import time
import paho.mqtt.client as mqtt
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient, AWSIoTMQTTShadowClient
# Set up the AWS IoT shadow client
shadow_client = AWSIoTMQTTShadowClient("testIoTPySDK")
shadow_client.configureEndpoint("redacted", 8883)
shadow_client.configureCredentials("redacted", "redacted", "redacted")
# Connect to AWS IoT and the shadow service
shadow_client.connect() and then it should work as expected. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jmklix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@github-actions proposed-answer
Looking at the code provided, I think the issue is that you have not configured
shadow_client
and instead configuredclient
, which is separate fromshadow_client
. As seen in this sample, you need to setup the shadow client in order for it to connect.In your case, I think can you adjust your code to the following: