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

Cannot install sphinxcontrib-kroki #1726

Closed
1 task done
sleiner opened this issue Feb 19, 2023 · 0 comments · Fixed by j178/pdm#1
Closed
1 task done

Cannot install sphinxcontrib-kroki #1726

sleiner opened this issue Feb 19, 2023 · 0 comments · Fixed by j178/pdm#1
Labels
🐛 bug Something isn't working

Comments

@sleiner
Copy link
Contributor

sleiner commented Feb 19, 2023

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

  • pdm init
  • pdm add sphinxcontrib-kroki

Actual behavior

% pdm add -v sphinxcontrib-kroki                                                                                                                         :(
Adding packages to default dependencies: sphinxcontrib-kroki
STATUS: Resolving dependencies
pdm.termui: ======== Start resolving requirements ========
pdm.termui:   sphinxcontrib-kroki
pdm.termui:   python>=3.11
pdm.termui:   Adding requirement sphinxcontrib-kroki
pdm.termui:   Adding requirement python>=3.11
pdm.termui: ======== Starting round 0 ========
STATUS: Resolving: new pin python>=3.11
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
unearth.preparer: Using cached <Link https://files.pythonhosted.org/packages/6c/45/df35ca9fbe04b1dba8a54b5fb9783c6a93e8df345c18fd40c4554a8936b4/sphinxcontrib-kroki-1.3.0.tar.gz (from https://pypi.org/simple/sphinxcontrib-kroki/)>
Traceback (most recent call last):
  File "/Users/simon/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 259, in main
    return Core().main(args)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 191, in main
    raise cast(Exception, err).with_traceback(traceback)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/core.py", line 186, in main
    f(project, options)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/cli/commands/add.py", line 58, in handle
    actions.do_add(
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/cli/actions.py", line 288, in do_add
    resolved = do_lock(
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/cli/actions.py", line 96, in do_lock
    mapping, dependencies = resolve(
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/resolver/core.py", line 35, in resolve
    result = resolver.resolve(requirements, max_rounds)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/resolvelib/resolvers.py", line 521, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/resolvelib/resolvers.py", line 402, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/resolvelib/resolvers.py", line 238, in _attempt_to_pin_criterion
    criteria = self._get_updated_criteria(candidate)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/resolvelib/resolvers.py", line 228, in _get_updated_criteria
    for requirement in self._p.get_dependencies(candidate=candidate):
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/resolver/providers.py", line 189, in get_dependencies
    deps, requires_python, _ = self.repository.get_dependencies(candidate)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/repositories.py", line 78, in get_dependencies
    requirements, requires_python, summary = getter(candidate)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/repositories.py", line 35, in wrapper
    result = func(self, candidate)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/repositories.py", line 228, in _get_dependencies_from_metadata
    deps = prepared.get_dependencies_from_metadata()
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/candidates.py", line 541, in get_dependencies_from_metadata
    self.req.project_name, self.metadata.requires or [], extras  # type: ignore
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/candidates.py", line 525, in metadata
    result = self.prepare_metadata()
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/models/candidates.py", line 457, in prepare_metadata
    pyproject = PyProject(pyproject_toml, ui=self.environment.project.core.ui)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/project/toml_file.py", line 18, in __init__
    self._data = self.read()
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/project/project_file.py", line 24, in read
    metadata, settings = converter.convert(None, self._path, None)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/formats/flit.py", line 152, in convert
    return converter.convert()
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/formats/base.py", line 61, in convert
    self._data[key] = func(self, value)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/formats/flit.py", line 101, in name
    description_in_ast, version_in_ast = get_docstring_and_version_via_ast(source)
  File "/Users/simon/.local/pipx/venvs/pdm/lib/python3.10/site-packages/pdm/formats/flit.py", line 48, in get_docstring_and_version_via_ast
    node = ast.parse(target.read_bytes())
  File "/usr/local/Cellar/[email protected]/3.10.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 1126, in read_bytes
    with self.open(mode='rb') as f:
  File "/usr/local/Cellar/[email protected]/3.10.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: 'sphinxcontrib-kroki.py'

Expected behavior

Package is added and installed.

Environment Information

PDM version:
  2.4.5
Python Interpreter:
  /Users/simon/tmp/pdm-kroki/.venv/bin/python (3.11)
Project Root:
  /Users/simon/tmp/pdm-kroki
Project Packages:
  None
{
  "implementation_name": "cpython",
  "implementation_version": "3.11.1",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "21.6.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64",
  "python_full_version": "3.11.1",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "darwin"
}
@sleiner sleiner added the 🐛 bug Something isn't working label Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant