Comments (4)
Is there any chance any of the 436 lines that precede your microdot import are consuming a large part of your memory? You are calling this a "basic setup", but my definition of basic setup would be that you run the web server on its own. These devices have limited resources. If you don't pre-compile your sources, then you must import the largest files first, so that there is more memory available to the compiler. Or else, you should seriously consider pre-compiling, or better yet, freezing as much of your code and libraries as possible.
from microdot.
Thanks for answering so fast...
I had more code working before I encountered this problem. I stripped my code down to basically the minimum. In the 437 lines are functions that are not being used, that makes it so long. I have removed that function now, still with the same result. I even deactivated webrepl.
Could it be that there is a chain of exceptions within your code, each exception consuming heap space or something?
import threading
fails when I try that in the repl
Can I turn on debug somehow? I am not that familiar with micropython yet..
from microdot.
@hagenbuch Most MicroPython ports do not have threading. It is expected for that import to fail. If you are getting any errors, you have to show me the statements that you issued and the errors if you need me to comment on them.
I would suggest that you take hello.py from this repository and save it as your main.py, and see if that works or not. And as I said, if you get any errors, copy the full output here.
from microdot.
See https://microdot.readthedocs.io/en/latest/freezing.html for information on how to cross-compile and/or freeze your application and dependencies to reduce the memory footprint.
from microdot.
Related Issues (20)
- microdot hangs when aborting static file serve HOT 7
- Async server does not run on Python 3.12 HOT 1
- Websocket example doesn't work on CPython / Linux: invalid start byte HOT 2
- send_file hangs when using microdot_asyncio bug HOT 1
- websocket: limit maximum message length HOT 1
- Hang on python 3.10.4 HOT 3
- ws is not working HOT 1
- Client ECONNRESET errors when POSTing to micropython microdot from micropython aiohttp HOT 2
- Shutdown not completing request HOT 12
- Some crashes cause the server to exit
- long/complex URLs cause recursion limit HOT 9
- ".." in URL path resolves correctly, "//" does not HOT 4
- signal module doesnt exist in micropython HOT 4
- Integer-type dynamic path component does not match 0 HOT 3
- CircuitPython support HOT 6
- Upload Progress (solved) & Block multiple uploads HOT 1
- Add an example of an API
- Session
- Allow application to configure session cookie options
- [BUG] WebSocket HOT 6
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 microdot.