Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect message on file not found #56

Closed
bdb112 opened this issue Mar 16, 2019 · 2 comments
Closed

Incorrect message on file not found #56

bdb112 opened this issue Mar 16, 2019 · 2 comments

Comments

@bdb112
Copy link

bdb112 commented Mar 16, 2019

see next comment

@bdb112 bdb112 changed the title Incorrect message eon file not found Incorrect message on file not found Mar 16, 2019
@bdb112
Copy link
Author

bdb112 commented Mar 16, 2019

If a non-existent file is opened e..g
pyexcel_ods.read_data('/tmp/odf/test.os') # deliberate typo in name, works if no type
The error message is:
NoSupportingPluginFound: No suitable library found for os

My simple fix is, just before

reader = READERS.get_a_plugin(file_type, library)
in /pyexcel_io/io.py, insert

import os  # should be in header
if not os.path.exists(file_name):
    raise IOError(file_name + ' not found')

I have only tested this with ods (spreadsheet) files.

@bdb112 bdb112 closed this as completed Mar 16, 2019
@bdb112 bdb112 reopened this Mar 16, 2019
@chfw
Copy link
Member

chfw commented Mar 16, 2019

You are right. Should have tested the file existence first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants