Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.15.1
-
Arch Linux, Python 3.7
Description
I get the following error when trying to open a file that does not exist.
```
pyarrow.lib.ArrowIOError: Failed to open local file 'filename', error: No such file or directory
```
In my opinion, this particular error should also subclass from Python FileNotFoundError. It currently only inherits from IOError (which is a superclass of FileNotFoundError).
```
>>> import pyarrow
>>> try:
... raise pyarrow.lib.ArrowIOError
... except IOError:
... pass
...
>>> try:
... raise pyarrow.lib.ArrowIOError
... except FileNotFoundError:
... print('caught')
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
pyarrow.lib.ArrowIOError
>>> try:
... raise pyarrow.lib.ArrowIOError
... except IOError:
... print('caught')
...
caught
```
Attachments
Issue Links
- supercedes
-
ARROW-6851 [Python] Should OSError be FileNotFoundError?
- Closed
- links to