Skip to content

connect() fails with esp32spi (pyportal): TypeError: unsupported types for __add__: 'int', 'NoneType' #234

Closed
@baldengineer

Description

@baldengineer

Using the example minimqtt_adafruitio_esp32spi.py on a PyPortal.

Other ESP / Wi-Fi operations work fine. This issue isn't limited to just this example. However, it is the easiest method to demonstrate the error.

settings.toml contains entries for:

CIRCUITPY_WIFI_SSID
CIRCUITPY_WIFI_PASSWORD
aio_username
aio_key

Version specifics:

Adafruit CircuitPython 9.2.1 on 2024-11-20; Adafruit PyPortal with samd51j20
nina/esp Firmware vers. 1.7.7

adafruit_connection_manager==3.1.2
adafruit_requests==4.1.8
adafruit_ticks==1.1.1
adafruit_esp32spi==8.4.2
adafruit_io==5.10.1
adafruit_portalbase==2.1.2
adafruit_pyportal==6.3.6
adafruit_register==1.10.1
adafruit_minimqtt==7.11.0

When attempting to connect to an MQTT broker, this error occurs:

Traceback (most recent call last):
  File "code.py", line 103, in <module>
  File "adafruit_minimqtt/adafruit_minimqtt.py", line 430, in connect
  File "adafruit_minimqtt/adafruit_minimqtt.py", line 554, in _connect
  File "adafruit_minimqtt/adafruit_minimqtt.py", line 476, in _send_bytes
TypeError: unsupported types for __add__: 'int', 'NoneType'

Line 103 of minimqtt_adafruitio_esp32spi.py is mqtt_client.connect()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions