pimoroni / pimoroni-pico

Libraries and examples to support Pimoroni Pico add-ons in C++ and MicroPython.
https://shop.pimoroni.com/collections/pico
MIT License
1.28k stars 485 forks source link

Automation2040W Running the web interface example exception #978

Closed ArkNieckarz closed 3 weeks ago

ArkNieckarz commented 1 month ago

Following instruction at: https://learn.pimoroni.com/article/getting-started-with-automation-2040-w, under Running the web interface example section. I see network is connected and received IP from router, but receiving an exception as such:

MPY: soft reboot
Network: NetworkIoT
Connection successful!
IP: 10.10.1.238
Network Running
Task exception wasn't retrieved
future: <Task> coro= <generator object '_tcp_server' at 2001c710>
Traceback (most recent call last):
  File "asyncio/core.py", line 1, in run_until_complete
  File "/lib/tinyweb/server.py", line 621, in _tcp_server
  File "asyncio/core.py", line 1, in queue_read
  File "asyncio/core.py", line 1, in _enqueue
AttributeError: 'NoneType' object has no attribute 'data'
MicroPython v1.23.0, picow v1.23.0-1 on 2024-06-06; Raspberry Pi Pico W with RP2040

Anyone else tried the web interface example for Automation2040W?

ArkNieckarz commented 1 month ago

After debugging and testing, need to use the original source for tinyweb from https://github.com/belyalov/tinyweb The source has fixes and updated for MicroPython > 1.19 After updating, only tinyweb, the sample web page works great. Would be great to update the docs and libs under pimoroni\pimoroni-pico-main\micropython\examples\common\lib\tinyweb