Hi,
New to micropython and esp8266! I have installed according to the tutorial here on micropython.org. Everything seems to go well, I get the REPL prompt but when I try to follow the tutorial code examples it fails! As an example when I write to a file :
>>>
>>> f = open('data.txt', 'w')
>>> f.write('some data')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'write'
Another examples is webrepl_setup nothing happens I only get the REPL prompt back!
I should mention that i flashed the esp8266 with 512k firmware, is that related? I have used esp8266-512k-20170608-v1.9-35-ge1cda003.bin and esp8266-512k-20170607-v1.9-32-g4d2778c9.bin
Read docs before using 512K modules, was: Problem with install?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Problem with install?
I rather think the 512K version lacks a filesystem. You could find out if I'm right by issuing
If it throws an exception there is no filesystem.
Code: Select all
import os
os.listdir('/')
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Problem with install?
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/