flatpak / flatpak-builder-tools

Various helper tools for flatpak-builder
198 stars 108 forks source link

pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "'/pyinsta'": Expected stringEnd #272

Open elibroftw opened 2 years ago

elibroftw commented 2 years ago

My requirements.txt

build_files/pyinstaller-4.9-py3-none-any.whl
build_files/PyAudio-0.2.11-cp310-cp310-win_amd64.whl; sys_platform == 'win32'
pyaudio; sys_platform != 'win32'
pgi; sys_platform == 'linux'
testresources; sys_platform == 'linux'
ujson==5.1.0
pycparser==2.14
mutagen~=1.45.1
Pillow~=9.0
pychromecast~=10.3.0
protobuf==3.19.1
zeroconf~=0.37
pynput~=1.4.5
pypng~=0.0.20
pypresence~=4.0
pyqrcode~=1.2.1
PySimpleGUI==4.59.0
pystray==0.19.1
requests==2.26
urllib3~=1.26.7
wavinfo==1.6
youtube_dl
werkzeug~=2.0.2
pyperclip~=1.8
python-vlc==3.0.12118
lz4==3.1.3
browser_cookie3~=0.12
beautifulsoup4~=4.10
flask~=2.0
deezer-py~=1.2
deemix~=3.5
six~=1.16
portalocker~=2.4.0
# pyinstaller dependencies
setuptools==60.5.0
altgraph
pyinstaller-hooks-contrib >= 2020.11
pefile; sys_platform == 'win32'
pywin32-ctypes; sys_platform == 'win32'
pypiwin32; sys_platform == 'win32'
macholib; sys_platform == 'darwin'
python-tkdnd; sys_platform != 'win32'
# dev
GitPython~=3.1
autopep8
requirements-parser

Command I ran ./build_files/flatpak-pip-generator.py --requirements-file=requirements.txt --output flatpak-pypi-deps

Full traceback

Traceback (most recent call last):
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 102, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString
    raise exc
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1644, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 3417, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1406, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 3205, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pkg_resources._vendor.pyparsing.ParseException: Expected stringEnd (at char 11), (line:1, col:12)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./build_files/flatpak-pip-generator.py", line 154, in <module>
    packages = list(requirements.parse(reqs_as_str))
  File "/home/fortanix/.local/lib/python3.8/site-packages/requirements/parser.py", line 87, in parse
    yield Requirement.parse(line)
  File "/home/fortanix/.local/lib/python3.8/site-packages/requirements/requirement.py", line 254, in parse
    return cls.parse_line(line)
  File "/home/fortanix/.local/lib/python3.8/site-packages/requirements/requirement.py", line 232, in parse_line
    pkg_req = Req.parse(line)
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3154, in parse
    req, = parse_requirements(s)
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3099, in parse_requirements
    yield Requirement(line)
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3109, in __init__
    super(Requirement, self).__init__(requirement_string)
  File "/home/fortanix/.local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 104, in __init__
    raise InvalidRequirement(
pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "'/pyinsta'": Expected stringEnd
TingPing commented 2 years ago

All of the requirements parsing is handled by the external requirements-parser project. I don't think anything is actionable here.