sarugaku/passa

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

Opened this issue · 0 comments

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')