Skip to content

Commit

Permalink
Add an error handling for execution binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Jul 15, 2018
1 parent d1b1731 commit b89e0d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sqlitebiter/_ipynb_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ def load_ipynb_file(file_path, encoding):
return nbformat.read(f, as_version=4)
except AttributeError as e:
raise nbformat.reader.NotJSONError(msgfy.to_error_message(e))
except IOError as e:
if re.search("No such file or directory: .+schema.json", six.text_type(e)):
raise nbformat.reader.NotJSONError(
"ipynb file format conversion not supported for the binary version."
"please try to install sqlitebiter via pip."
)
else:
raise


def load_ipynb_url(url, proxies):
Expand Down

0 comments on commit b89e0d3

Please sign in to comment.