adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.14k stars 1.22k forks source link

esp32-eye is flaky #6745

Open jepler opened 2 years ago

jepler commented 2 years ago

CircuitPython version

8.0.0-alpha (various)

Code/REPL

print("Connecting to Adafruit IO")                                              
mqtt_client = MQTT.MQTT(                                                        
    broker="io.adafruit.com",                                                   
    username=aio_username,
    password=aio_key,
    socket_pool=pool,                                                           
    ssl_context=ssl.create_default_context(),                                   
)

Behavior

Connecting to Adafruit IO
Traceback (most recent call last):
  File "<stdin>", line 55, in <module>
TypeError: function got multiple values for argument 'socket_pool'

Description

The exact error varies with the order of imports, order of object creation, etc, but usually seems to boil down to getting one object confused for another in an impossible way.

The same source files and libs on an Adafruit Feather ESP32 V2 do not exhibit the same problem. However, the same file will give the same message on two different ESP32-EYE boards, and it's also consistent from run to run. (V2 feather has a different amount of PSRAM, a different PSRAM chip, and connects to different pins on the CPU)

This is with web workflow enabled and configured in CIRCUITPY/.env. It happens whether or not any PSRAM is reserved for esp-idf. (default is reserve 1MB, but can also be set in /.env)

Additional information

Things To Investigate

Separately, should wire up a camera to a V2 feather and verify the esp32-camera library works on esp32. I initially thought the problem might occur when the camera was used, but on further investigation this does not seem to be the case.

DavePutz commented 1 year ago

I don't have an ESP32-EYE board; but tested adafruit-circuitpython-espressif_esp32_eye-en_US-8.0.0-rc.2.bin on a similar board (AI-Thinker ESP32-CAM). It ran successful MQTT wifi tests for over an hour on 3 separate runs.