jczic / MicroWebSrv2

The last Micro Web Server for IoTs (MicroPython) or large servers (CPython), that supports WebSockets, routes, template engine and with really optimized architecture (mem allocations, async I/Os). Ready for ESP32, STM32 on Pyboard, Pycom's chipsets (WiPy, LoPy, ...). Robust, efficient and documented!
https://github.com/jczic/MicroWebSrv2
MIT License
662 stars 97 forks source link

MemoryError on PyCom SiPy #7

Closed William04A closed 4 years ago

William04A commented 4 years ago

Hi! I previously used a library/web framework called picoweb on my PyCom, but I just found this new version of MicroWebSrv which seems much better documented to me!

However, when loading the module on a SiPy and trying to import it, I get a MemoryError:

Traceback (most recent call last):
  File "main.py", line 10, in <module>
  File "serving_static/server.py", line 3, in <module>
  File "/flash/lib/MicroWebSrv2/__init__.py", line 14, in <module>
MemoryError: memory allocation failed, allocating 136 byte
Pycom MicroPython 1.20.0.rc13 [v1.9.4-94bb382] on 2019-08-22; SiPy with ESP32
Type "help()" for more information.

Do you have any recommendations on how to get it to work, since MicroWebSrv2 claims it works on PyCom boards? I already tried using the gc module, but it did not help. Still the same error.

jczic commented 4 years ago

Ok, I think that your SiPy module doesn't have 4Mo RAM right? It's an old Pycom SiPy version with less than 128K of RAM?

William04A commented 4 years ago

You are correct! I tried the library with a PyCom GPy that I bought yesterday and it worked like a charm. Finally a well-documented, easy understandable micro web framework for PyCom and ESP32. You should be proud!

jczic commented 4 years ago

Thank you 👍