Error when trying to read a file

  • My WIPY3 gets OSError: [Errno 13] EACCES when trying to read a file. I've tried restoring if to factory settings and still. Some weeks ago it was fine, but I get this error since yesterday.

    My code on ( is empty):

    import os
    f = open('datos','w')
    f = open('datos','w')

    This is what i get on console:

    Uploading project (main folder)...
    Safe booting device... (see settings for more info)
    Uploading to /flash...
    Reading file status
    [1/1] Writing file (0kb)
    Upload done, resetting board...
    OKets Jun  8 2016 00:22:57
    rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    mode:DIO, clock div:1
    entry 0x400a05bc
    Traceback (most recent call last):
      File "", line 9, in <module>
    OSError: [Errno 13] EACCES
    Pycom MicroPython 1.20.2.r3 [v1.11-044dfea] on 2020-12-23; WiPy with ESP32
    Type "help()" for more information.

    I've tried updating the firmware, deleted /flash folder several times... seems like it doesnt have perms to read files on /flash, tho it can create the files (i've seen them on FTP)

    any help please?

  • @robert-hh thank robert, with filezilla it works nice.

  • @Manuel-Martín Try another ftp client, like filezilla. I have the same issue here with chrome. Filezilla works.

  • @robert-hh im accesing through a chrome tab window:
    after asking me user and password it allows me to see and access all the files, and can download all of them though they end up being as empty files in my computer

  • @Manuel-Martín Hard to tell why.
    Which ftp client are you using?
    Can you download other files with ftp, like

  • my god... thank you very much. it works now, but I have another issue: when I try to download the file trough FTP, its always empty. can someone help me with that please?

  • @Manuel-Martín said in Error when trying to read a file:

    f = open('datos','w')

    In line 8 you open the file in Write mode. Then you cannot read from it. You have to open it in read mode

    f = open('datos','r')

Log in to reply

Pycom on Twitter