Release beta LittleFS read file err 9 (update for fatfs filesystem syntax error)



  • For the problem of the syntax error after some restarts I tried to update the firmware to version 1.9.0.b4 using as filesystem LittleFS is met the following problems (I save a file in json format for the configuration of the device on the flash) :

    The first one immediately after the update (the functions are not eliminated at most deprecated):

    rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:1
    load:0x3fff8028,len:8
    load:0x3fff8030,len:1984
    load:0x4009fa00,len:0
    load:0x4009fa00,len:19112
    entry 0x400a05e4
    Initializing filesystem as LittleFS!
    Traceback (most recent call last):
      File "main.py", line 13, in <module>
      File "xConfigureFile.py", line 35, in __init__
      File "xConfigureFile.py", line 49, in load
    AttributeError: 'TextIOWrapper' object has no attribute 'readall'
    Pycom MicroPython 1.19.0.b4 [v1.9.4-50f84dd] on 2018-07-13; LoPy with ESP32
    >>> ets Jun  8 2016 00:22:57
    

    The second, I can no longer open and read the file:

    rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:1
    load:0x3fff8028,len:8
    load:0x3fff8030,len:1984
    load:0x4009fa00,len:0
    load:0x4009fa00,len:19112
    entry 0x400a05e4
    Initializing filesystem as LittleFS!
    Pycom MicroPython 1.19.0.b4 [v1.9.4-50f84dd] on 2018-07-13; LoPy with ESP32
    >>> import os
    >>> os.listdir()
    ['main.py', 'boot.py', 'sys', 'lib', 'cert', 'www', 'SI7006A20.py', 'project.pymakr', 'hal.py', 'mqtt.py', 'simple.py','umqtt.py', 'xApp.py', 'xConfigureFile.py', 'xHTTPConfigure.py', 'xWebServer.py', 'xWebSocket.py', 'config.json']
    >>> f = open('config.json', 'w')
    >>> data = f.read()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: [Errno 9] EBADF
    >>>
    

    readlines (), readline () same problem

    regards
    Giacomo Mola


 

Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter