the following error showed up while I was training a neural network:
File "train.py", line 397, in <module> File "train.py", line 270, in train File "train.py", line 335, in train_one_epochs File "train.py", line 113, in log_string
OSError: [Errno 30] Read-only file system
Error in sys.excepthook:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 57, in apport_excepthook File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 896, in _find_and_load_unlocked File "<frozen importlib._bootstrap_external>", line 1139, in find_spec File "<frozen importlib._bootstrap_external>", line 1113, in _get_spec File "<frozen importlib._bootstrap_external>", line 1225, in find_spec File "<frozen importlib._bootstrap_external>", line 1264, in _fill_cache
OSError: [Error 5] Input/output error: '/usr/lib/python3.5/plat-x86_64-linux-gnu'
Original exception was:
Traceback (most recent call last): File "train.py", line 397, in <module> File "train.py", line 270, in train File "train.py", line 335, in train_one_epoch File "train.py", line 113, in log_string
OSError: [Errno 30] Read-only file systemThe code where error happened is:
111 def log_string(out_str):
112 LOG_FOUT.write(out_str+'\n')
113 LOG_FOUT.flush()
114 print(out_str)Does anyone know the reason? Any help or suggestion would be appreciated! Thanks!
31 Answer
It looks like the filesystem the application is logging to was mounted as read only.
You can try remounting it with
mount -o remount,rw {mount point}Where {mount point} is the directory where the FS is mounted.
2