adafruit / circuitpython

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

wifi.radio.enabled=False causes error with debug mode on #9406

Closed tyeth closed 3 days ago

tyeth commented 1 month ago

CircuitPython version

latest (main) ~9.1beta5  DEBUG BUILD

Code/REPL

calling `wifi.radio.enabled = False` (before deep sleeping)

Behavior

wifi:pm stop, total sleep time: Assertion '*fmt == '%' || !"unsupported fmt char"' failed, at file mpprint.c:586

Description

Appears the debug message contains "%" which is not supported, or at least that was my impression after visiting https://github.com/micropython/micropython/issues/3004

Additional information

No response

dhalbert commented 1 month ago

I think it may contain ... %<something>, where the <something> is not supported.

jepler commented 1 month ago

There's a hack somewhere that tries to print espidf messages via mp_printf so they are visible on the repl, not requiring a separate debug uart. I guess this isn't compatible with all formats used in espidf

tyeth commented 1 month ago

That was my thunk, thanks Dan. I did see a successful log example when searching for the time related string. Forgot to mention running on an itsy bitsy esp32

On Sat, 6 Jul 2024, 16:49 Dan Halbert, @.***> wrote:

I think it may contain ... %, where the is not supported.

— Reply to this email directly, view it on GitHub https://github.com/adafruit/circuitpython/issues/9406#issuecomment-2211802638, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTBZ434ZTHXPOHLOYPQPU3ZLAGX7AVCNFSM6AAAAABKOQ65P2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRHAYDENRTHA . You are receiving this because you authored the thread.Message ID: @.***>

tannewt commented 1 month ago

This is the printf connector: https://github.com/adafruit/circuitpython/blob/8fbbb598ffd72c93e01c5ed04618e2ce89134cf1/ports/espressif/supervisor/port.c#L489-L497

I do need to comment it out from time to time when debugging too.

jepler commented 1 month ago

let's just back it out if it causes crashes.