Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

poetry fails on dephell-generated poetry.lock #484

Open
bitphage opened this issue Dec 30, 2020 · 0 comments
Open

poetry fails on dephell-generated poetry.lock #484

bitphage opened this issue Dec 30, 2020 · 0 comments

Comments

@bitphage
Copy link

bitphage commented Dec 30, 2020

Short description

If I try to run poetry install with dephell-generated poetry.lock, it fails

Traceback

% poetry install -v
Using virtualenv: /home/vvk/.cache/pypoetry/virtualenvs/birdfeeder-RTSm1Qke-py3.7
Installing dependencies from lock file
  
  Stack trace:
  
  9  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/console_application.py:131 in run
     status_code = command.handle(parsed_args, io)
  
  8  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py:120 in handle
     status_code = self._do_handle(args, io)
  
  7  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py:171 in _do_handle
     return getattr(handler, handler_method)(args, io, self)
  
  6  ~/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/command.py:92 in wrap_handle
     return self.handle()
  
  5  ~/.poetry/lib/poetry/console/commands/install.py:71 in handle
     return_code = self._installer.run()
  
  4  ~/.poetry/lib/poetry/installation/installer.py:103 in run
     return self._do_install(local_repo)
  
  3  ~/.poetry/lib/poetry/installation/installer.py:239 in _do_install
     locked_repository = self._locker.locked_repository(True)
  
  2  ~/.poetry/lib/poetry/packages/locker.py:130 in locked_repository
     package.optional = info["optional"]
  
  1  ~/.poetry/lib/poetry/_vendor/py3.7/tomlkit/items.py:1018 in __getitem__
     return self._value[key]
  
  NonExistentKey

  'Key "optional" does not exist.'

  at ~/.poetry/lib/poetry/_vendor/py3.7/tomlkit/container.py:576 in __getitem__
      572│             key = Key(key)
      573│
      574│         idx = self._map.get(key, None)
      575│         if idx is None:
    → 576│             raise NonExistentKey(key)
      577│
      578│         if isinstance(idx, tuple):
      579│             # The item we are getting is an out of order table
      580│             # so we need a proxy to retrieve the proper objects

...

Config

[tool.dephell.lock] 
from = {format = "poetry", path = "pyproject.toml"}
to = {format = "poetrylock", path = "poetry.lock"}
...

The problem is that poetry.lock generated by poetry itself contains optional key, while dephell-generated doesn't.

poetry:

[[package]]
category = "dev"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
name = "appdirs"
optional = false
python-versions = "*"
version = "1.4.4"

dephell:

[[package]]
name = "appdirs"
version = "1.4.4"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "main"

Versions

{                                                          
  "cache": "7.79Mb",
  "path": "/home/vvk/.local/share/dephell/venvs/dephell/lib/python3.7/site-packages/dephell",
  "python": "/home/vvk/.local/share/dephell/venvs/dephell/bin/python3",
  "version": "0.8.3",
  "versions": {
    "dephell-archive": "0.1.7",
    "dephell-argparse": "0.1.3",
    "dephell-changelogs": "0.0.1",
    "dephell-discover": "0.2.10",
    "dephell-licenses": "0.1.7",
    "dephell-links": "0.1.5",
    "dephell-markers": "1.0.3",
    "dephell-pythons": "0.1.15",
    "dephell-setuptools": "0.2.4",
    "dephell-shells": "0.1.5",
    "dephell-specifier": "0.2.2",
    "dephell-venvs": "0.1.18",
    "dephell-versioning": "0.1.2"
  }
}

...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant