Skip to content

writing code.py on Linux causes: OSError: [Errno 5] Input/output error #229

@dhalbert

Description

@dhalbert

CircuitPython Version

8.2.0
9.0.0
9.1.1
all of above tested on two RP2040 boards

also reproduced the problem on 9.1.1 on an ESP32-S3

did not reproduce on a Trinket M0

Workflow(s)

USB in code-beta.circuitpython.org on 2024-08-07, 2019 ET

Browser(s)

Version 127.0.6533.99 (Official Build) (64-bit) on Ubuntu 24.04

Console Log

Load different workflow
index.js:91 Requesting any serial device...
index.js:91 > Requested  SerialPort {onconnect: null, ondisconnect: null, readable: null, writable: null}
index.js:91 switch to SerialPort {onconnect: null, ondisconnect: null, readable: null, writable: null}
index.js:93 Read Loop Init
index.js:93 Read Loop Started
index.js:91 Getting Device UID...
index.js:93 Device UID: F6254209F45633
index.js:91 Successfully loaded directory: CIRCUITPY
index.js:91 New folder name: CIRCUITPY
index.js:91 SerialPort {onconnect: null, ondisconnect: null, readable: ReadableStream, writable: WritableStream}
index.js:89 Connected!
index.js:89 Path: /code.py
index.js:93 Current File Changed to: /code.py

[no output when writing code.py]

Steps

  1. Shift reload https://code-beta.circuitpython.org
  2. select USB and choose serial and CIRCUITPY for an RP2040 board (I've tried two). The board has previously had storage.erase_filesystem() done, so CIRCUITPY is in good shape.
  3. open Serial window
  4. edit code.py and another another print() statement. Note that saving code.py does NOT cause an auto-reload
  5. Type ctrl-D in serial window. I get:
>>> 
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
OSError: [Errno 5] Input/output error

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

The OSError is new. It did not show up if I did ctrl-D before editing the file.

Description

No response

Additional information

This does not seem to reflect a corrupted CIRCUITPY. Instead, it is some other I/O error, maybe due to something being done via serial. If I disconnect from web-editor and just connect via a terminal program, without resetting, and do a ctrl-D, I do not see the OSError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions