'NoneType' has no len() - When reading from UART - Serial Bridge MAX3232 #12985
-
Hi everyone, I have connected the serial console of my homeserver to a MAX3232 Converter and attached said converter to my ESP32 via UART. With Microdot I provide a website to watch the boot messages using xterm.js and a websocket: I had help over here . As you can see from the image, the UART output is pretty garbled, I am reading it with readline and convert it to a string :
I tried with read(), but Nones still seem to slip through, because with:
I am getting a I would appreciate any ideas and insights on how to best forward the UART information to the websocket or how to filter out the NoneTypes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok, I think I figured it out. The while True would send Nones to the websocket even with the filter within if there was no new information. This fixed it:
|
Beta Was this translation helpful? Give feedback.
Ok, I think I figured it out. The while True would send Nones to the websocket even with the filter within if there was no new information.
This fixed it:
The output looks actually very nice now: