FileNotFound error when using python 2.7
sitaktif opened this issue · comments
Sitaktif commented
The README mentions that marshall is compatible with python 2.7 but running it with python 2.7.14 fails with:
$ python remarshal.py
usage: remarshal.py [-h] [-i INPUT] [-o OUTPUT] -if {json,toml,yaml} -of
{json,toml,yaml} [--indent-json] [--yaml-style {,',",|,>}]
[--wrap WRAP] [--unwrap UNWRAP] [-v]
[inputfile]
remarshal.py: error: argument -if/--input-format is required
Traceback (most recent call last):
File "remarshal.py", line 209, in <module>
main()
File "remarshal.py", line 202, in main
except (FileNotFoundError, NotADirectoryError, PermissionError,
NameError: global name 'FileNotFoundError' is not defined
Changing the references to these python 3 exceptions into IOError
(using e.errno
to check the type of IO error) seems to fix the issue.
D. Bohdan commented
Thanks for the report! Please try the latest commit and tell me if it works for you.
Sitaktif commented
Works like a charm, thanks!
Would you consider making this new version a release on Github?