Comments (5)
@dpgeorge Sure. While I was debugging this yesterday I came up with a fix as well, so I have created a PR: micropython/micropython#7365.
from micropython-async.
Given that microdot
claims to support MicroPython, perhaps you'd be better off raising an issue there. It's not a package I've used. Is it possible that they haven't yet tested against the new uasyncio
?
from micropython-async.
@peterhinch Yeah, we've been discussing this issue with @dubaleeiro earlier today and it was my theory that this was a bug in uasyncio.
I just spent some time debugging it and found it to be a race condition in the server creation code for uasyncio. You can't basically call server.wait_closed()
too soon after calling create_server()
. Sometimes you may get lucky and everything works, other times, wait_closed()
tries to access attributes of the server object that haven't been created yet.
I have now added a workaround on my side. Sorry for the trouble!
from micropython-async.
If you have found a bug in uasyncio
please create a simple test case and raise an issue against it on GitHub MicroPython where @dpgeorge will doubtless address it.
from micropython-async.
You can't basically call
server.wait_closed()
too soon after callingcreate_server()
. Sometimes you may get lucky and everything works, other times,wait_closed()
tries to access attributes of the server object that haven't been created yet.
That does sound like a bug in uasyncio
, which should probably be fixed.
from micropython-async.
Related Issues (20)
- Scheduling HOT 11
- Pushbutton double and long press events HOT 3
- as_GPS problem HOT 5
- ThreadSafeQueue import error HOT 1
- Asyncio and sending serial data to SIM7600 (SMS) HOT 2
- __init__.py: import of Encoder fails. HOT 2
- Queue task_done/join enhancement HOT 3
- `uasyncio` is now renamed to `asyncio` in latest HOT 2
- coroutine not recognized HOT 1
- Feedback related to Quadrature Encoder HOT 1
- Where is ESwitch? HOT 2
- Course/compass direction - wild fluxuations. HOT 2
- Pushbutton class buggy ? HOT 5
- Feature request - WaitAny accepts task HOT 3
- question? HOT 2
- queue.py: Tuples are not read back correctly HOT 2
- Import uasyncio HOT 2
- Question about sharing data beween async and non ansync tasks HOT 7
- Detected simultaneous button presses with SwArray HOT 2
- GPS crashes on invalid input HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micropython-async.