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

Better error messaging (or more eager validation) for invalid requirement lines #30

Open
uranusjr opened this issue Sep 1, 2018 · 0 comments

Comments

@uranusjr
Copy link
Member

uranusjr commented Sep 1, 2018

Traceback (most recent call last):
  File "runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "passa/__main__.py", line 6, in <module>
    main()
  File "passa/cli/__init__.py", line 47, in main
    result = f(options)
  File "passa/cli/_base.py", line 73, in main
    return type(self).__dict__["parsed_main"](options)
  File "passa/cli/lock.py", line 13, in main
    locker = BasicLocker(project)
  File "passa/internals/lockers.py", line 79, in __init__
    project.pipfile, "packages",
  File "passa/internals/lockers.py", line 28, in _get_requirements
    for name, package in model.get(section_name, {}).items()
  File "passa/internals/lockers.py", line 26, in <dictcomp>
    return {identify_requirment(r): r for r in (
  File "passa/internals/lockers.py", line 28, in <genexpr>
    for name, package in model.get(section_name, {}).items()
  File "requirementslib/models/requirements.py", line 856, in from_pipfile
    r = FileRequirement.from_pipfile(name, pipfile)
  File "requirementslib/models/requirements.py", line 402, in from_pipfile
    return cls(**arg_dict)
  File "<attrs generated init 297509fcbd532345fa7483f0babc819f4f2b9a5a>", line 27, in __init__
  File "attr/validators.py", line 106, in __call__
    self.validator(inst, attr, value)
  File "requirementslib/models/utils.py", line 157, in validate_path
    raise ValueError("Invalid path {0!r}", format(value))
ValueError: ('Invalid path {0!r}', './../../lib/python')
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