Hi,
It seems like micropython doesn't have access to create a file, Please help me out
[code]
>>> f=open("main.py","w")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 13] EACCES
>>> os.listdir()
['\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00',.................
[/code]
File Permission issues - OSError: [Errno 13] EACCES
Re: File Permission issues - OSError: [Errno 13] EACCES
Which module are you using? Filesystem is only supported with modules >512k of flash.
That os.listdir() looks like there is no filesystem.
That os.listdir() looks like there is no filesystem.
Re: File Permission issues - OSError: [Errno 13] EACCES
Also try erasing the flash completely using the latest esptool.py.
Re: File Permission issues - OSError: [Errno 13] EACCES
Hello All,
I have the same error when I try to create a file.
When I was uploading main.py by WebREPL, the connection to module was broken. After restart, I don't have access to filesystem.
[code]
#4 ets_task(40100164, 3, 3fff8398, 4)
could not open file 'boot.py' for reading
could not open file 'main.py' for reading
MicroPython v1.8.6-7-gefd0927 on 2016-11-10; ESP module with ESP8266
Type "help()" for more information.
>>> import os
>>> os.listdir()
['\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00........................................
[/code]
I've tried to flash firmware again. I've tried to flash entire rom by blank.bin. No success.
Do you have any idea how to fix it?
I have the same error when I try to create a file.
When I was uploading main.py by WebREPL, the connection to module was broken. After restart, I don't have access to filesystem.
[code]
#4 ets_task(40100164, 3, 3fff8398, 4)
could not open file 'boot.py' for reading
could not open file 'main.py' for reading
MicroPython v1.8.6-7-gefd0927 on 2016-11-10; ESP module with ESP8266
Type "help()" for more information.
>>> import os
>>> os.listdir()
['\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00........................................
[/code]
I've tried to flash firmware again. I've tried to flash entire rom by blank.bin. No success.
Do you have any idea how to fix it?
Re: File Permission issues - OSError: [Errno 13] EACCES
I have sometimes had luck trying to rebuild the file system by hand from scratch:
Otherwise, I understand many flash issues are due to poor power being supplied to the board (though honestly, I believe many of the issues I have seen have been with initialization after flashing, even when the flash image verifies after writing).
Code: Select all
from flashbdev import bdev
uos.VfsFat.mkfs(bdev)
vfs = uos.VfsFat(bdev, "")
with open("/boot.py", "w") as f:
f.write("""\
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
import gc
#import webrepl
#webrepl.start()
gc.collect()
""")
f.close()
Re: File Permission issues - OSError: [Errno 13] EACCES
OK.. I'm a complete newcomer to this MicroPython, but it looks interesting.. I'm confused though, about this concept that the filesystem is only available on (8266) devices with over 512k.. I have a "SparkFun ESP8266 Dev Thing" that has 512k that I was going to use to play with, but if it has no filesystem, does that mean I can only use it interactively? Without a filesystem, there's no place to store a program to run on bootup, right? If so, this would seriously be a limiting factor, and I may as well just order another board, right? What am I missing?
Thanks in advance!
Steve
Thanks in advance!
Steve
Re: File Permission issues - OSError: [Errno 13] EACCES
It helped, thank you fdushin.
I've read about power problems, but I'm using "YwRobot Power MB V2" to power module.
I've read about power problems, but I'm using "YwRobot Power MB V2" to power module.
Re: File Permission issues - OSError: [Errno 13] EACCES
That's correct, you will be able to use the python prompt with it, but not store your code in flash memory. There is, however a 512k support release: http://forum.micropython.org/viewtopic. ... 140#p15688 that might be sufficient for your needs.172pilot wrote:Without a filesystem, there's no place to store a program to run on bootup, right? If so, this would seriously be a limiting factor, and I may as well just order another board, right? What am I missing?
Unless you have a solid reason for using 512k modules (price constraints in production), get a different module, adafruit's esp huzzah feather, for example.