Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinyweb not working above micropython ESP32 firmware 1.19 #56

Open
staberas opened this issue Dec 6, 2023 · 1 comment
Open

tinyweb not working above micropython ESP32 firmware 1.19 #56

staberas opened this issue Dec 6, 2023 · 1 comment

Comments

@staberas
Copy link

staberas commented Dec 6, 2023

ESP32C3 with firmware 1.20 -1.22 throws a uasyncio related error but the problem and solution is related with the micropython changes from v1.19.1 (which works) to 1.21-1.22

Description of problem:
the traceback says the error occurs on the def _tcp_server function
specifically on line 650 -> yield uasyncio.core._io_queue.queue_read(sock)
it errors out there and if you try to load the page/ip location you get a connection refused on the browser.

@FabianClemenz
Copy link
Contributor

@staberas @belyalov i have provided a fix #57 which adds compatibility with micropython above version v1.19.0

@staberas as a quick workaround, simply remove the uasyncio imports at the top and import asyncio

And around the line 649 remove

if IS_UASYNCIO_V3:
   yield uasyncio.core._io_queue.queue_read(sock)
else:
   yield asyncio.IORead(sock)

and add

yield asyncio.core._io_queue.queue_read(sock)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants