Open jevylux opened 5 months ago
Hi
I am getting the same error as you
Did you get anywhere with it ?
Thanks
Andy
Hi, i am on holiday right now. I will check when i am back home mid of next weekRegardsMarcSent from my iPhoneOn 14 Oct 2024, at 19:32, andrewpbrooker @.***> wrote: Hi I am getting the same error as you Did you get anywhere with it ? Thanks Andy
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I have a problem with the following code running on a raspberry pico with the image RPI_PICO_W-20240602-v1.23.0.uf2
`from phew import connect_to_wifi, server from machine import Pin, PWM import json
import network_cred ip = connect_to_wifi(network_cred.SSID, network_cred.PASSWORD) print("Connected to IP", ip)
.....
@server.route("/api/control-led", methods=["POST"]) def ledCommand(request):
@server.catchall() def catchall(request): return "Not found", 404
server.run()`
When sending a POST request i get the following error :
Task exception wasn't retrieved future: coro= <generator object '_handle_request' at 20015230>
Traceback (most recent call last):
File "asyncio/core.py", line 1, in run_until_complete
File "/lib/phew/server.py", line 277, in _handle_request
AttributeError: 'NoneType' object has no attribute 'status'