Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AttributeError: 'SecuredWebSocketCore' object has no attribute 'pending' #299

Closed
@rbattle

Description

@rbattle

We are seeing errors with the python mqtt client:

Exception in thread Thread-2:
Traceback (most recent call last):
  File \"/usr/lib64/python3.7/threading.py\", line 926, in _bootstrap_inner
    self.run()
  File \"/usr/lib64/python3.7/threading.py\", line 870, in run
    self._target(*self._args, **self._kwargs)
  File \"/aws-iot-device-sdk-python/AWSIoTPythonSDK/core/protocol/paho/client.py\", line 2398, in _thread_main
    self.loop_forever()
  File \"/aws-iot-device-sdk-python/AWSIoTPythonSDK/core/protocol/paho/client.py\", line 1370, in loop_forever
    rc = self.loop(timeout, max_packets)
  File \"/aws-iot-device-sdk-python/AWSIoTPythonSDK/core/protocol/paho/client.py\", line 883, in loop
    pending_bytes = self._ssl.pending()
AttributeError: 'SecuredWebSocketCore' object has no attribute 'pending'

Connect timed out
Traceback (most recent call last):
  File \"/aws-iot-device-sdk-python/hello_world_assertion_client.py\", line 38, in <module>
    myAWSIoTMQTTClient.connect()
  File \"/aws-iot-device-sdk-python/AWSIoTPythonSDK/MQTTLib.py\", line 513, in connect
    return self._mqtt_core.connect(keepAliveIntervalSecond)
  File \"/aws-iot-device-sdk-python/AWSIoTPythonSDK/core/protocol/mqtt_core.py\", line 199, in connect
    raise connectTimeoutException()
AWSIoTPythonSDK.exception.AWSIoTExceptions.connectTimeoutException

I think it is related to #296 and #297

Should

    pending_bytes = self._ssl.pending()

instead be

    pending_bytes = self._ssl.getSSLSocket().pending()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions