Skip to content

Instantly share code, notes, and snippets.

@iksteen
Created October 1, 2020 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iksteen/bd4fd24e2b79e0f0644461fe501297d4 to your computer and use it in GitHub Desktop.
Save iksteen/bd4fd24e2b79e0f0644461fe501297d4 to your computer and use it in GitHub Desktop.
 $ poetry export -vvv -frequirements.txt
Stack trace:
6 ~/.poetry/lib/poetry/_vendor/py3.8/clikit/console_application.py:131 in run
129│ parsed_args = resolved_command.args
130│
→ 131│ status_code = command.handle(parsed_args, io)
132│ except KeyboardInterrupt:
133│ status_code = 1
5 ~/.poetry/lib/poetry/_vendor/py3.8/clikit/api/command/command.py:120 in handle
118│ def handle(self, args, io): # type: (Args, IO) -> int
119│ try:
→ 120│ status_code = self._do_handle(args, io)
121│ except KeyboardInterrupt:
122│ if io.is_debug():
4 ~/.poetry/lib/poetry/_vendor/py3.8/clikit/api/command/command.py:171 in _do_handle
169│ handler_method = self._config.handler_method
170│
→ 171│ return getattr(handler, handler_method)(args, io, self)
172│
173│ def __repr__(self): # type: () -> str
3 ~/.poetry/lib/poetry/_vendor/py3.8/cleo/commands/command.py:92 in wrap_handle
90│ self._command = command
91│
→ 92│ return self.handle()
93│
94│ def handle(self): # type: () -> Optional[int]
2 ~/.poetry/lib/poetry/console/commands/export.py:66 in handle
64│
65│ exporter = Exporter(self.poetry)
→ 66│ exporter.export(
67│ fmt,
68│ self.poetry.file.parent,
1 ~/.poetry/lib/poetry/utils/exporter.py:37 in export
35│ raise ValueError("Invalid export format: {}".format(fmt))
36│
→ 37│ getattr(self, "_export_{}".format(fmt.replace(".", "_")))(
38│ cwd,
39│ output,
IndexError
list index out of range
at ~/.poetry/lib/poetry/utils/exporter.py:76 in _export_requirements_txt
72│ if not dev
73│ else self._poetry.package.all_requires,
74│ with_nested=True,
75│ ):
→ 76│ package = repository.find_packages(dependency=dependency)[0]
77│
78│ # If a package is optional and we haven't opted in to it, continue
79│ if package.optional and package.name not in extra_package_names:
80│ continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment