Comments (5)
The WebServer
class extends Nanoweb
from this repository, which means the original nenoweb is innocent about the problem, I think.
i have also try only to import the Nanoweb class directly from REPL and i get the same error, "memory allocation failed".
Your lib
module has other stuff that might cause implicit side effects like additional memory allocation. Please erase all things in the ESP8266 and try importing the unmodified nanoweb.py solely.
from micropython-nanoweb.
It's not that strange because ESP8266 has small working memory. Bisecting the addition of lines and sharing the entire code (your extended Nanoweb and the main.py) with minimal additions that causes the error is necessary to find what's wrong.
from micropython-nanoweb.
hello.
main.py: https://pastebin.com/GaSQhByM
web_server.py: https://pastebin.com/waAYjSzf
i have also try only to import the Nanoweb class directly from REPL and i get the same error, "memory allocation failed".
MicroPython v1.20.0 on 2023-04-26; ESP module with ESP8266
Type "help()" for more information.
>>> from lib.nanoweb import Nanoweb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
MemoryError: memory allocation failed, allocating 584 bytes
>>> from lib.nanoweb import Nanoweb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: can't import name Nanoweb
>>> import gc
>>> gc.mem_free()
12576
from micropython-nanoweb.
hi,
i manage to found the problem inside another file, something is not working right on that file.
Now i am trying to make the nanoweb to work with captive portal in AP mode and regular web server in STA mode.
L.E.: If we add the '/hotspot-detect.html' inside the routes, on Apple phones if the host responds with 200 OK then will redirect the page to that content.
from micropython-nanoweb.
Good to hear that you find the root cause. I think this topic is now set and ready to close @SoulRaven
from micropython-nanoweb.
Related Issues (18)
- GET and POST methods? HOT 3
- Unable to get the examples working HOT 1
- Energy efficiency HOT 2
- Expending the request handler (Feature request) HOT 2
- OSError: [Errno 5] EIO Task exception wasn't retrieved HOT 2
- Slight syntax difference breaks example.py on the Pico W HOT 3
- Unable to access files in subfolders HOT 7
- support sending gzipped files? HOT 5
- Another issue, style sheet doesn't load fully through your server HOT 1
- POST method implementation issues HOT 1
- Thanks! HOT 1
- Connection Reset error when responding to request after reading part of request HOT 1
- example.py missing base64_decode() reference HOT 1
- send_response() not implemented in example.py HOT 2
- Add configurable static file folder HOT 5
- Possible updates for send_file() function HOT 2
- How to upload ? HOT 5
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-nanoweb.