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

Add clear error message when pipper.json has the wrong format or library doesn't exist #7

Open
rigogsilva opened this issue Jul 16, 2018 · 0 comments

Comments

@rigogsilva
Copy link

This is the error I got when I left the pipper.json empty.

A good feature request would be to add an error message like: invalid pipper.json and also Requested library not found: foo.

Traceback (most recent call last):
  File "/usr/local/bin/pipper", line 11, in <module>
    sys.exit(run())
  File "/usr/local/lib/python3.6/site-packages/pipper/command.py", line 63, in run
    action(env)
  File "/usr/local/lib/python3.6/site-packages/pipper/installer.py", line 182, in run
    install_from_configs(env, env.args.get('configs_path'))
  File "/usr/local/lib/python3.6/site-packages/pipper/installer.py", line 161, in install_from_configs
    configs = environment.load_configs(configs_path)
  File "/usr/local/lib/python3.6/site-packages/pipper/environment.py", line 119, in load_configs
    return json.load(f)
  File "/usr/local/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
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

1 participant