-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
pypa/packaging
#129Labels
auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automationgood first issueA good item for first time contributors to work onA good item for first time contributors to work onproject: vendored dependencyRelated to a vendored dependencyRelated to a vendored dependencytype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior
Description
- Pip version: pip 10.0.0b2 from /Users/guido/v37/lib/python3.7/site-packages/pip (python 3.7)
- Python version: anything between 3.3 and 3.7
- Operating system: Mac
Description:
I made a typo on the command line and accidentally ran pip3 install -. I expected a nice error message. Instead I got one, but in addition I got two tracebacks.
What I've run:
$ pip3 install -
Invalid requirement: '-'
Traceback (most recent call last):
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/packaging/requirements.py", line 93, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1632, in parseString
raise exc
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1622, in parseString
loc, tokens = self._parse( instring, 0 )
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 3395, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 3717, in parseImpl
return self.expr._parse( instring, loc, doActions, callPreParse=False )
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 3378, in parseImpl
loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/pyparsing.py", line 2689, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 252, in from_line
req = Requirement(req)
File "/Users/guido/v37/lib/python3.7/site-packages/pip/_vendor/packaging/requirements.py", line 97, in __init__
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'-'"
$
Metadata
Metadata
Assignees
Labels
auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automationgood first issueA good item for first time contributors to work onA good item for first time contributors to work onproject: vendored dependencyRelated to a vendored dependencyRelated to a vendored dependencytype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior