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

[KeyError]: 'sections' #270

Closed
1 task done
yajo opened this issue Feb 20, 2021 · 4 comments · Fixed by #273
Closed
1 task done

[KeyError]: 'sections' #270

yajo opened this issue Feb 20, 2021 · 4 comments · Fixed by #273
Labels
🐛 bug Something isn't working

Comments

@yajo
Copy link

yajo commented Feb 20, 2021

  • 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 install -v in checkout of this commit: copier-org/copier@5ffe2d0

Actual behavior

Traceback (most recent call last):
  File "/var/home/yajo/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 73, in __call__
    return self.main(*args, **kwargs)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 112, in main
    raise err.with_traceback(traceback)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 108, in main
    f(options.project, options)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/commands/install.py", line 39, in handle
    actions.do_sync(
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/actions.py", line 123, in do_sync
    candidates.update(project.get_locked_candidates())
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/project/core.py", line 315, in get_locked_candidates
    if section != "__all__" and section not in package["sections"]:
KeyError: 'sections'

Expected behavior

No failure.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:        1.3.1                        
Python Interpreter: /usr/bin/python (3.9.1)      
Project Root:       /var/home/yajo/mydevel/copier
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.1",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.10.12-200.fc33.x86_64",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Mon Feb 1 02:40:52 UTC 2021",
  "python_full_version": "3.9.1",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.9",
  "sys_platform": "linux"
}
@yajo yajo added the 🐛 bug Something isn't working label Feb 20, 2021
@frostming
Copy link
Collaborator

try generating the lock file again?

@yajo
Copy link
Author

yajo commented Feb 24, 2021

Actually it happens while generating it (1st time pdm install ever). I ran it with -v:

➤ pdm install -v
Lock file does not exist, trying to generate one...
======== Start resolving requirements ========
        backports.cached-property<2.0.0,>=1.0.0; python_version < "3.8"
        colorama<1.0.0,>=0.4.3
        iteration-utilities<1.0.0,>=0.10.1
        jinja2<3.0.0,>=2.11.2
        packaging<21.0,>=20.4
        pathspec<1.0.0,>=0.8.0
        plumbum<2.0.0,>=1.6.9
        pydantic<2.0.0,>=1.7.2
        Pygments<3.0.0,>=2.7.1
        pyyaml<6.0.0,>=5.3.1
        pyyaml-include<2.0,>=1.2
        questionary<2.0.0,>=1.8.1
        typing-extensions<4.0.0,>=3.7.4; python_version < "3.8"
        autoflake<2.0,>=1.4
        black<21.0,>=20.8b1
        flake8<4.0.0,>=3.8.4
        flake8-bugbear<21.0.0,>=20.1.4
        flake8-comprehensions<4.0.0,>=3.2.3
        flake8-debugger<4.0.0,>=3.2.1
        mypy<1.0,>=0.790
        pexpect<5.0.0,>=4.8.0
        pre-commit<3.0.0,>=2.7.1
        pytest<7.0.0,>=6.1.1
        pytest-cov<3.0.0,>=2.10.1
        pytest-xdist<3.0.0,>=2.1.0
        mkdocs-material<6.0.0,>=5.5.2
        mkdocs-mermaid2-plugin<1.0.0,>=0.5.0
        git+https://github.com/pawamoy/mkdocstrings.git@master#egg=mkdocstrings
        git+https://github.com/pawamoy/pytkdocs.git@master#egg=pytkdocs
        Adding requirement backports.cached-property<2.0.0,>=1.0.0; python_version < "3.8"
        Adding requirement colorama<1.0.0,>=0.4.3
        Adding requirement iteration-utilities<1.0.0,>=0.10.1
        Adding requirement jinja2<3.0.0,>=2.11.2
        Adding requirement packaging<21.0,>=20.4
        Adding requirement pathspec<1.0.0,>=0.8.0
        Adding requirement plumbum<2.0.0,>=1.6.9
        Adding requirement pydantic<2.0.0,>=1.7.2
        Adding requirement Pygments<3.0.0,>=2.7.1
        Adding requirement pyyaml<6.0.0,>=5.3.1
        Adding requirement pyyaml-include<2.0,>=1.2
        Adding requirement questionary<2.0.0,>=1.8.1
        Adding requirement typing-extensions<4.0.0,>=3.7.4; python_version < "3.8"
        Adding requirement autoflake<2.0,>=1.4
        Adding requirement black<21.0,>=20.8b1
        Adding requirement flake8<4.0.0,>=3.8.4
        Adding requirement flake8-bugbear<21.0.0,>=20.1.4
        Adding requirement flake8-comprehensions<4.0.0,>=3.2.3
        Adding requirement flake8-debugger<4.0.0,>=3.2.1
        Adding requirement mypy<1.0,>=0.790
        Adding requirement pexpect<5.0.0,>=4.8.0
        Adding requirement pre-commit<3.0.0,>=2.7.1
        Adding requirement pytest<7.0.0,>=6.1.1
        Adding requirement pytest-cov<3.0.0,>=2.10.1
        Adding requirement pytest-xdist<3.0.0,>=2.1.0
        Adding requirement mkdocs-material<6.0.0,>=5.5.2
        Adding requirement mkdocs-mermaid2-plugin<1.0.0,>=0.5.0
        Adding requirement git+https://github.com/pawamoy/mkdocstrings.git@master#egg=mkdocstrings
Preparing isolated env for PEP 517 build...
Collecting poetry-core
  Using cached poetry_core-1.0.2-py2.py3-none-any.whl (424 kB)
Installing collected packages: poetry-core
Successfully installed poetry-core-1.0.2
        Adding requirement git+https://github.com/pawamoy/pytkdocs.git@master#egg=pytkdocs
Preparing isolated env for PEP 517 build...
Collecting poetry-core
  Using cached poetry_core-1.0.2-py2.py3-none-any.whl (424 kB)
Installing collected packages: poetry-core
Successfully installed poetry-core-1.0.2
        Adding requirement pyflakes>=1.1.0(from autoflake 1.4)
Resolving: autoflake 1.4
        New pin: autoflake 1.4
======== Ending round 0 ========
        Adding requirement click>=7.1.2(from black 20.8b1)
        Adding requirement appdirs(from black 20.8b1)
        Adding requirement toml>=0.10.1(from black 20.8b1)
        Adding requirement typed-ast>=1.4.0(from black 20.8b1)
        Adding requirement regex>=2020.1.8(from black 20.8b1)
        Adding requirement pathspec<1,>=0.6(from black 20.8b1)
        Adding requirement typing-extensions>=3.7.4(from black 20.8b1)
        Adding requirement mypy-extensions>=0.4.3(from black 20.8b1)
        Adding requirement dataclasses>=0.6; python_version < "3.7"(from black 20.8b1)
Resolving: black 20.8b1
        New pin: black 20.8b1
======== Ending round 1 ========
        Adding requirement flake8>=1.5(from flake8-debugger 3.2.1)
        Adding requirement pycodestyle(from flake8-debugger 3.2.1)
Resolving: flake8-debugger 3.2.1
        New pin: flake8-debugger 3.2.1
======== Ending round 2 ========
        Adding requirement Jinja2<3.0,>=2.11(from mkdocstrings 0.14.0)
        Adding requirement Markdown<4.0,>=3.3(from mkdocstrings 0.14.0)
        Adding requirement MarkupSafe<2.0,>=1.1(from mkdocstrings 0.14.0)
        Adding requirement mkdocs<2.0,>=1.1(from mkdocstrings 0.14.0)
        Adding requirement pymdown-extensions<9.0,>=6.3(from mkdocstrings 0.14.0)
        Adding requirement pytkdocs<0.11.0,>=0.2.0(from mkdocstrings 0.14.0)
Preparing isolated env for PEP 517 build...
Collecting poetry-core
  Using cached poetry_core-1.0.2-py2.py3-none-any.whl (424 kB)
Installing collected packages: poetry-core
Successfully installed poetry-core-1.0.2
Resolving: mkdocstrings 0.14.0
        New pin: mkdocstrings 0.14.0
======== Ending round 3 ========
        Adding requirement cached-property<2.0.0,>=1.5.2; python_version < "3.8"(from pytkdocs 0.10.1)
        Adding requirement dataclasses<0.9,>=0.7; python_version == "3.6"(from pytkdocs 0.10.1)
        Adding requirement typing-extensions<4.0.0.0,>=3.7.4.3; python_version < "3.8"(from pytkdocs 0.10.1)
Resolving: pytkdocs 0.10.1
        New pin: pytkdocs 0.10.1
======== Ending round 4 ========
        Adding requirement pyflakes<2.3.0,>=2.2.0(from flake8 3.8.4)
        Adding requirement pycodestyle<2.7.0,>=2.6.0a1(from flake8 3.8.4)
        Adding requirement mccabe<0.7.0,>=0.6.0(from flake8 3.8.4)
        Adding requirement importlib-metadata; python_version < "3.8"(from flake8 3.8.4)
Resolving: flake8 3.8.4
        New pin: flake8 3.8.4
======== Ending round 5 ========
        Adding requirement ptyprocess>=0.5(from pexpect 4.8.0)
Resolving: pexpect 4.8.0
        New pin: pexpect 4.8.0
======== Ending round 6 ========
Resolving: pyflakes 2.2.0
        New pin: pyflakes 2.2.0
======== Ending round 7 ========
Resolving: click 7.1.2
        New pin: click 7.1.2
======== Ending round 8 ========
Resolving: mypy-extensions 0.4.3
        New pin: mypy-extensions 0.4.3
======== Ending round 9 ========
Resolving: pycodestyle 2.6.0
        New pin: pycodestyle 2.6.0
======== Ending round 10 ========
Resolving: cached-property 1.5.2
        New pin: cached-property 1.5.2
======== Ending round 11 ========
Resolving: typing-extensions 3.7.4.3
        New pin: typing-extensions 3.7.4.3
======== Ending round 12 ========
Resolving: colorama 0.4.4
        New pin: colorama 0.4.4
======== Ending round 13 ========
        Adding requirement MarkupSafe>=0.23(from jinja2 2.11.3)
Resolving: jinja2 2.11.3
        New pin: jinja2 2.11.3
======== Ending round 14 ========
Resolving: pathspec 0.8.1
        New pin: pathspec 0.8.1
======== Ending round 15 ========
        Adding requirement pypiwin32; platform_system == "Windows" and platform_python_implementation != "PyPy"(from plumbum 1.7.0)
Resolving: plumbum 1.7.0
        New pin: plumbum 1.7.0
======== Ending round 16 ========
        Adding requirement prompt-toolkit<4.0,>=2.0(from questionary 1.9.0)
Resolving: questionary 1.9.0
        New pin: questionary 1.9.0
======== Ending round 17 ========
        Adding requirement flake8>=3.0.0(from flake8-bugbear 20.11.1)
        Adding requirement attrs>=19.2.0(from flake8-bugbear 20.11.1)
Resolving: flake8-bugbear 20.11.1
        New pin: flake8-bugbear 20.11.1
======== Ending round 18 ========
        Adding requirement setuptools>=18.5(from mkdocs-mermaid2-plugin 0.5.1)
        Adding requirement beautifulsoup4>=4.6.3(from mkdocs-mermaid2-plugin 0.5.1)
        Adding requirement mkdocs>=1.0.4(from mkdocs-mermaid2-plugin 0.5.1)
        Adding requirement jsbeautifier(from mkdocs-mermaid2-plugin 0.5.1)
        Adding requirement pyyaml(from mkdocs-mermaid2-plugin 0.5.1)
        Adding requirement mkdocs-material(from mkdocs-mermaid2-plugin 0.5.1)
        Adding requirement requests(from mkdocs-mermaid2-plugin 0.5.1)
        Adding requirement pymdown-extensions>=8.0(from mkdocs-mermaid2-plugin 0.5.1)
Resolving: mkdocs-mermaid2-plugin 0.5.1
        New pin: mkdocs-mermaid2-plugin 0.5.1
======== Ending round 19 ========
Resolving: toml 0.10.2
        New pin: toml 0.10.2
======== Ending round 20 ========
Resolving: dataclasses 0.8
        New pin: dataclasses 0.8
======== Ending round 21 ========
Resolving: mccabe 0.6.1
        New pin: mccabe 0.6.1
======== Ending round 22 ========
        Adding requirement PyYAML<6.0,>=5.3.1(from pyyaml-include 1.2.post2)
Resolving: pyyaml-include 1.2.post2
        New pin: pyyaml-include 1.2.post2
======== Ending round 23 ========
        Adding requirement flake8!=3.2.0,<4,>=3.0(from flake8-comprehensions 3.3.1)
        Adding requirement importlib-metadata; python_version < "3.8"(from flake8-comprehensions 3.3.1)
Resolving: flake8-comprehensions 3.3.1
        New pin: flake8-comprehensions 3.3.1
======== Ending round 24 ========
        Adding requirement pytest>=4.6(from pytest-cov 2.11.1)
        Adding requirement coverage>=5.2.1(from pytest-cov 2.11.1)
Resolving: pytest-cov 2.11.1
        New pin: pytest-cov 2.11.1
======== Ending round 25 ========
        Adding requirement execnet>=1.1(from pytest-xdist 2.2.1)
        Adding requirement pytest>=6.0.0(from pytest-xdist 2.2.1)
        Adding requirement pytest-forked(from pytest-xdist 2.2.1)
Resolving: pytest-xdist 2.2.1
        New pin: pytest-xdist 2.2.1
======== Ending round 26 ========
        Adding requirement click>=3.3(from mkdocs 1.1.2)
        Adding requirement Jinja2>=2.10.1(from mkdocs 1.1.2)
        Adding requirement livereload>=2.5.1(from mkdocs 1.1.2)
        Adding requirement lunr[languages]==0.5.8(from mkdocs 1.1.2)
        Adding requirement Markdown>=3.2.1(from mkdocs 1.1.2)
        Adding requirement PyYAML>=3.10(from mkdocs 1.1.2)
        Adding requirement tornado>=5.0(from mkdocs 1.1.2)
Resolving: mkdocs 1.1.2
        New pin: mkdocs 1.1.2
======== Ending round 27 ========
        Adding requirement future>=0.16.0(from lunr 0.5.8)
        Adding requirement six>=1.11.0(from lunr 0.5.8)
        Adding requirement nltk>=3.2.5; python_version > "2.7"(from lunr 0.5.8)
        Adding requirement lunr==0.5.8(from lunr 0.5.8)
Resolving: lunr 0.5.8
        New pin: lunr 0.5.8
======== Ending round 28 ========
        Adding requirement future>=0.16.0(from lunr 0.5.8)
        Adding requirement six>=1.11.0(from lunr 0.5.8)
Resolving: lunr 0.5.8
        New pin: lunr 0.5.8
======== Ending round 29 ========
        Adding requirement importlib-metadata; python_version < "3.8"(from Markdown 3.3.3)
Resolving: Markdown 3.3.3
        New pin: Markdown 3.3.3
======== Ending round 30 ========
        Adding requirement Markdown>=3.2(from pymdown-extensions 8.1.1)
Resolving: pymdown-extensions 8.1.1
        New pin: pymdown-extensions 8.1.1
======== Ending round 31 ========
Resolving: future 0.18.2
        New pin: future 0.18.2
======== Ending round 32 ========
Resolving: ptyprocess 0.7.0
        New pin: ptyprocess 0.7.0
======== Ending round 33 ========
        Adding requirement click(from nltk 3.5)
        Adding requirement joblib(from nltk 3.5)
        Adding requirement regex(from nltk 3.5)
        Adding requirement tqdm(from nltk 3.5)
Resolving: nltk 3.5
        New pin: nltk 3.5
======== Ending round 34 ========
        Adding requirement typing>=3.6; python_version < "3.7"(from backports.cached-property 1.0.1)
Resolving: backports.cached-property 1.0.1
        New pin: backports.cached-property 1.0.1
======== Ending round 35 ========
Resolving: Pygments 2.8.0
        New pin: Pygments 2.8.0
======== Ending round 36 ========
        Adding requirement attrs>=19.2.0(from pytest 6.2.2)
        Adding requirement iniconfig(from pytest 6.2.2)
        Adding requirement packaging(from pytest 6.2.2)
        Adding requirement pluggy<1.0.0a1,>=0.12(from pytest 6.2.2)
        Adding requirement py>=1.8.2(from pytest 6.2.2)
        Adding requirement toml(from pytest 6.2.2)
        Adding requirement importlib-metadata>=0.12; python_version < "3.8"(from pytest 6.2.2)
        Adding requirement atomicwrites>=1.0; sys_platform == "win32"(from pytest 6.2.2)
        Adding requirement colorama; sys_platform == "win32"(from pytest 6.2.2)
Resolving: pytest 6.2.2
        New pin: pytest 6.2.2
======== Ending round 37 ========
        Adding requirement importlib-metadata>=0.12; python_version < "3.8"(from pluggy 0.13.1)
Resolving: pluggy 0.13.1
        New pin: pluggy 0.13.1
======== Ending round 38 ========
Resolving: py 1.10.0
        New pin: py 1.10.0
======== Ending round 39 ========
Resolving: iniconfig 1.1.1
        New pin: iniconfig 1.1.1
======== Ending round 40 ========
Resolving: attrs 20.3.0
        New pin: attrs 20.3.0
======== Ending round 41 ========
        Adding requirement six(from livereload 2.6.3)
        Adding requirement tornado; python_version > "2.7"(from livereload 2.6.3)
Resolving: livereload 2.6.3
        New pin: livereload 2.6.3
======== Ending round 42 ========
Resolving: six 1.15.0
        New pin: six 1.15.0
======== Ending round 43 ========
        Adding requirement pyparsing>=2.0.2(from packaging 20.9)
Resolving: packaging 20.9
        New pin: packaging 20.9
======== Ending round 44 ========
Resolving: appdirs 1.4.4
        New pin: appdirs 1.4.4
======== Ending round 45 ========
Resolving: atomicwrites 1.4.0
        New pin: atomicwrites 1.4.0
======== Ending round 46 ========
        Adding requirement py(from pytest-forked 1.3.0)
        Adding requirement pytest>=3.10(from pytest-forked 1.3.0)
Resolving: pytest-forked 1.3.0
        New pin: pytest-forked 1.3.0
======== Ending round 47 ========
        Adding requirement pywin32>=223(from pypiwin32 223)
Resolving: pypiwin32 223
        New pin: pypiwin32 223
======== Ending round 48 ========
Resolving: typing 3.7.4.3
        New pin: typing 3.7.4.3
======== Ending round 49 ========
        Adding requirement cfgv>=2.0.0(from pre-commit 2.10.1)
        Adding requirement identify>=1.0.0(from pre-commit 2.10.1)
        Adding requirement nodeenv>=0.11.1(from pre-commit 2.10.1)
        Adding requirement pyyaml>=5.1(from pre-commit 2.10.1)
        Adding requirement toml(from pre-commit 2.10.1)
        Adding requirement virtualenv>=20.0.8(from pre-commit 2.10.1)
        Adding requirement importlib-resources; python_version < "3.7"(from pre-commit 2.10.1)
        Adding requirement importlib-metadata; python_version < "3.8"(from pre-commit 2.10.1)
Resolving: pre-commit 2.10.1
        New pin: pre-commit 2.10.1
======== Ending round 50 ========
Resolving: cfgv 3.2.0
        New pin: cfgv 3.2.0
======== Ending round 51 ========
        Adding requirement apipkg>=1.4(from execnet 1.8.0)
Resolving: execnet 1.8.0
        New pin: execnet 1.8.0
======== Ending round 52 ========
Resolving: apipkg 1.5
        New pin: apipkg 1.5
======== Ending round 53 ========
        Adding requirement mkdocs>=1.1(from mkdocs-material 5.5.14)
        Adding requirement Pygments>=2.4(from mkdocs-material 5.5.14)
        Adding requirement markdown>=3.2(from mkdocs-material 5.5.14)
        Adding requirement pymdown-extensions>=7.0(from mkdocs-material 5.5.14)
        Adding requirement mkdocs-material-extensions>=1.0(from mkdocs-material 5.5.14)
Resolving: mkdocs-material 5.5.14
        New pin: mkdocs-material 5.5.14
======== Ending round 54 ========
        Adding requirement mkdocs-material>=5.0.0(from mkdocs-material-extensions 1.0.1)
Resolving: mkdocs-material-extensions 1.0.1
        New pin: mkdocs-material-extensions 1.0.1
======== Ending round 55 ========
        Adding requirement soupsieve>1.2; python_version >= "3.0"(from beautifulsoup4 4.9.3)
Resolving: beautifulsoup4 4.9.3
        New pin: beautifulsoup4 4.9.3
======== Ending round 56 ========
Resolving: nodeenv 1.5.0
        New pin: nodeenv 1.5.0
======== Ending round 57 ========
        Adding requirement dataclasses>=0.6; python_version < "3.7"(from pydantic 1.7.3)
Resolving: pydantic 1.7.3
        New pin: pydantic 1.7.3
======== Ending round 58 ========
Resolving: soupsieve 2.2
        New pin: soupsieve 2.2
======== Ending round 59 ========
Resolving: iteration-utilities 0.11.0
        New pin: iteration-utilities 0.11.0
======== Ending round 60 ========
Resolving: pyyaml 5.4.1
        New pin: pyyaml 5.4.1
======== Ending round 61 ========
        Adding requirement zipp>=0.4; python_version < "3.8"(from importlib-resources 5.1.0)
Resolving: importlib-resources 5.1.0
        New pin: importlib-resources 5.1.0
======== Ending round 62 ========
Resolving: zipp 3.4.0
        New pin: zipp 3.4.0
======== Ending round 63 ========
        Adding requirement typed-ast<1.5.0,>=1.4.0(from mypy 0.812)
        Adding requirement typing-extensions>=3.7.4(from mypy 0.812)
        Adding requirement mypy-extensions<0.5.0,>=0.4.3(from mypy 0.812)
Resolving: mypy 0.812
        New pin: mypy 0.812
======== Ending round 64 ========
        Adding requirement six>=1.13.0(from jsbeautifier 1.13.5)
        Adding requirement editorconfig>=0.12.2(from jsbeautifier 1.13.5)
Resolving: jsbeautifier 1.13.5
        New pin: jsbeautifier 1.13.5
======== Ending round 65 ========
Resolving: editorconfig 0.12.3
        New pin: editorconfig 0.12.3
======== Ending round 66 ========
        Adding requirement wcwidth(from prompt-toolkit 3.0.16)
Resolving: prompt-toolkit 3.0.16
        New pin: prompt-toolkit 3.0.16
======== Ending round 67 ========
Resolving: wcwidth 0.2.5
        New pin: wcwidth 0.2.5
======== Ending round 68 ========
        Adding requirement zipp>=0.5(from importlib-metadata 3.6.0)
        Adding requirement typing-extensions>=3.6.4; python_version < "3.8"(from importlib-metadata 3.6.0)
Resolving: importlib-metadata 3.6.0
        New pin: importlib-metadata 3.6.0
======== Ending round 69 ========
Resolving: pywin32 300
        New pin: pywin32 300
======== Ending round 70 ========
        Adding requirement appdirs<2,>=1.4.3(from virtualenv 20.4.2)
        Adding requirement distlib<1,>=0.3.1(from virtualenv 20.4.2)
        Adding requirement filelock<4,>=3.0.0(from virtualenv 20.4.2)
        Adding requirement six<2,>=1.9.0(from virtualenv 20.4.2)
        Adding requirement importlib-resources>=1.0; python_version < "3.7"(from virtualenv 20.4.2)
        Adding requirement importlib-metadata>=0.12; python_version < "3.8"(from virtualenv 20.4.2)
Resolving: virtualenv 20.4.2
        New pin: virtualenv 20.4.2
======== Ending round 71 ========
Resolving: distlib 0.3.1
        New pin: distlib 0.3.1
======== Ending round 72 ========
Resolving: filelock 3.0.12
        New pin: filelock 3.0.12
======== Ending round 73 ========
Resolving: joblib 1.0.1
        New pin: joblib 1.0.1
======== Ending round 74 ========
Resolving: pyparsing 2.4.7
        New pin: pyparsing 2.4.7
======== Ending round 75 ========
Resolving: typed-ast 1.4.2
        New pin: typed-ast 1.4.2
======== Ending round 76 ========
Resolving: MarkupSafe 1.1.1
        New pin: MarkupSafe 1.1.1
======== Ending round 77 ========
Resolving: tornado 6.1
        New pin: tornado 6.1
======== Ending round 78 ========
Resolving: identify 1.5.14
        New pin: identify 1.5.14
======== Ending round 79 ========
Resolving: coverage 5.4
        New pin: coverage 5.4
======== Ending round 80 ========
        Adding requirement chardet<5,>=3.0.2(from requests 2.25.1)
        Adding requirement idna<3,>=2.5(from requests 2.25.1)
        Adding requirement urllib3<1.27,>=1.21.1(from requests 2.25.1)
        Adding requirement certifi>=2017.4.17(from requests 2.25.1)
Resolving: requests 2.25.1
        New pin: requests 2.25.1
======== Ending round 81 ========
Resolving: chardet 4.0.0
        New pin: chardet 4.0.0
======== Ending round 82 ========
Resolving: idna 2.10
        New pin: idna 2.10
======== Ending round 83 ========
Resolving: certifi 2020.12.5
        New pin: certifi 2020.12.5
======== Ending round 84 ========
Resolving: urllib3 1.26.3
        New pin: urllib3 1.26.3
======== Ending round 85 ========
Resolving: tqdm 4.57.0
        New pin: tqdm 4.57.0
======== Ending round 86 ========
Resolving: regex 2020.11.13
        New pin: regex 2020.11.13
======== Ending round 87 ========
Resolving: setuptools 53.0.0
        New pin: setuptools 53.0.0
======== Ending round 88 ========
Finish resolving
======== Resolution Result ========
Stable pins:
                   autoflake 1.4
                       black 20.8b1
             flake8-debugger 3.2.1
                mkdocstrings 0.14.0
                    pytkdocs 0.10.1
                      flake8 3.8.4
                     pexpect 4.8.0
                    pyflakes 2.2.0
                       click 7.1.2
             mypy-extensions 0.4.3
                 pycodestyle 2.6.0
             cached-property 1.5.2
           typing-extensions 3.7.4.3
                    colorama 0.4.4
                      jinja2 2.11.3
                    pathspec 0.8.1
                     plumbum 1.7.0
                 questionary 1.9.0
              flake8-bugbear 20.11.1
      mkdocs-mermaid2-plugin 0.5.1
                        toml 0.10.2
                 dataclasses 0.8
                      mccabe 0.6.1
              pyyaml-include 1.2.post2
       flake8-comprehensions 3.3.1
                  pytest-cov 2.11.1
                pytest-xdist 2.2.1
                      mkdocs 1.1.2
             lunr[languages] 0.5.8
                        lunr 0.5.8
                    markdown 3.3.3
          pymdown-extensions 8.1.1
                      future 0.18.2
                  ptyprocess 0.7.0
                        nltk 3.5
   backports.cached-property 1.0.1
                    pygments 2.8.0
                      pytest 6.2.2
                      pluggy 0.13.1
                          py 1.10.0
                   iniconfig 1.1.1
                       attrs 20.3.0
                  livereload 2.6.3
                         six 1.15.0
                   packaging 20.9
                     appdirs 1.4.4
                atomicwrites 1.4.0
               pytest-forked 1.3.0
                   pypiwin32 223
                      typing 3.7.4.3
                  pre-commit 2.10.1
                        cfgv 3.2.0
                     execnet 1.8.0
                      apipkg 1.5
             mkdocs-material 5.5.14
  mkdocs-material-extensions 1.0.1
              beautifulsoup4 4.9.3
                     nodeenv 1.5.0
                    pydantic 1.7.3
                   soupsieve 2.2
         iteration-utilities 0.11.0
                      pyyaml 5.4.1
         importlib-resources 5.1.0
                        zipp 3.4.0
                        mypy 0.812
                jsbeautifier 1.13.5
                editorconfig 0.12.3
              prompt-toolkit 3.0.16
                     wcwidth 0.2.5
          importlib-metadata 3.6.0
                     pywin32 300
                  virtualenv 20.4.2
                     distlib 0.3.1
                    filelock 3.0.12
                      joblib 1.0.1
                   pyparsing 2.4.7
                   typed-ast 1.4.2
                  markupsafe 1.1.1
                     tornado 6.1
                    identify 1.5.14
                    coverage 5.4
                    requests 2.25.1
                     chardet 4.0.0
                        idna 2.10
                     certifi 2020.12.5
                     urllib3 1.26.3
                        tqdm 4.57.0
                       regex 2020.11.13
                  setuptools 53.0.0
Extracting package metadata
🔒 Lock successful
Changes are written to pdm.lock.
Traceback (most recent call last):
  File "/var/home/yajo/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 73, in __call__
    return self.main(*args, **kwargs)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 112, in main
    raise err.with_traceback(traceback)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 108, in main
    f(options.project, options)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/commands/install.py", line 39, in handle
    actions.do_sync(
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/actions.py", line 123, in do_sync
    candidates.update(project.get_locked_candidates())
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/project/core.py", line 315, in get_locked_candidates
    if section != "__all__" and section not in package["sections"]:
KeyError: 'sections'

@frostming
Copy link
Collaborator

It is caused by some circular dependencies in the docs section. You can temporarily workaround it by pdm lock in the current project directory and then you can install successfully

yajo added a commit to copier-org/copier that referenced this issue Feb 24, 2021
@yajo
Copy link
Author

yajo commented Feb 24, 2021

That unlocked my problem. I also stopped installing some deps from git because of the dependency conflict they introduce (affects poetry too, see copier-org/copier#362). Thank you!

Maybe the error message could be more helpful here.

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.

2 participants