IOError:[错误5]输入/输出错误 [英] IOError: [Errno 5] Input/output error

查看:116
本文介绍了IOError:[错误5]输入/输出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里有类似xml的文件: https://github.com/alvations/pywsd/blob/master/pywsd/data/semcor3.0_naf/brown1/br-e24.naf

I have a sort of xml like file here: https://github.com/alvations/pywsd/blob/master/pywsd/data/semcor3.0_naf/brown1/br-e24.naf

当我尝试按以下方式阅读时,出现了 IOError :

And when I tried to read it as below, I got an IOError:

>>> import io
>>> infile = io.open('pywsd/data/semcor3.0_naf/brown1/br-e24.naf', 'r', encoding='utf8')
>>> infile.read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 5] Input/output error

IOError:[Errono5] 是什么意思?

What does IOError: [Errono5] mean?

该错误是否告诉我我读取文件的方式有问题或文件有问题?

如何解决该错误?

推荐答案

man errno 说errno 5是 EIO :输入/输出错误(POSIX.1).

man errno says errno 5 is EIO: Input/output error (POSIX.1).

非常通用,例外情况也一样.

Pretty generic and the same you get in your exception.

从提供的信息中可以探索得到的范围.

This is as far as this can be explored from the information provided.

这篇关于IOError:[错误5]输入/输出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆