I'm working on nodemcu. I've created main.py file which gets executed automatically. Now, when I'm running the device, it is throwing this error - MemoryError:
It is not running a single thing on main.py. It is throwing error directly.
I commented the whole code and I'm still getting this error. So, it's not associated with variable size or import package size.
Filesize of main.py is 18kb which seems to be the problem according to me.
Please let me know how should I get around it?
Esp8266 throwing MemoryError:
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: Esp8266 throwing MemoryError:
* Separate your code into smaller modules and import them from main.py.
* Precompile your modules with mpy-cross on your PC and only copy the .mpy files to your board.
* Use frozen modules.
http://docs.micropython.org/en/latest/e ... ash-memory
* Precompile your modules with mpy-cross on your PC and only copy the .mpy files to your board.
* Use frozen modules.
http://docs.micropython.org/en/latest/e ... ash-memory
Re: Esp8266 throwing MemoryError:
I'm going to try .mpy file first. I couldn't try these as I had started working on the website. Thanks for these.SpotlightKid wrote: ↑Wed Nov 22, 2017 8:14 pm* Separate your code into smaller modules and import them from main.py.
* Precompile your modules with mpy-cross on your PC and only copy the .mpy files to your board.
* Use frozen modules.
http://docs.micropython.org/en/latest/e ... ash-memory