Skip to content

E_IO_002 — Cannot open file (write)

A write attempt on a file failed — the directory doesn't exist, the filesystem is read-only, the disk is full, or write permission is denied.

How to fix

Check the destination directory:

import os
out_dir = "out/recordings"
os.makedirs(out_dir, exist_ok=True)        # create if missing

rec = flox.MmapBarWriter(out_dir + "/BTCUSDT")

Common causes

  • Output directory missing — MmapBarWriter creates the symbol directory but not its parent.
  • Disk full — df -h on the target volume.
  • Write permission denied (e.g. trying to write under /usr or read-only mount).
  • Concurrent writer holding the file with an exclusive lock.