OSError:[Errno 30] 只读文件系统

OSError:[Errno 30] 只读文件系统

我在训练神经网络时出现以下错误:

    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 system

发生错误的代码是:

111    def log_string(out_str):
112        LOG_FOUT.write(out_str+'\n')
113        LOG_FOUT.flush()
114        print(out_str)

有人知道原因吗?任何帮助或建议都将不胜感激!谢谢!

答案1

看起来应用程序正在记录的文件系统是以只读方式安装的。

您可以尝试使用以下方法重新安装

mount -o remount,rw {mount point}

其中 {mount point} 是 FS 挂载的目录。

相关内容