strong-processor-70970
02/05/2025, 9:54 AMpants generate-lockfiles
ValueError: Invalid requirement '[[package]]' in poetry.lock at line 3: Parse error at "'[[packag'": Expected W:(0-9A-Za-z)
My configuration is as follows:
pants.toml
[GLOBAL]
pants_version = "2.24.0"
backend_packages = [
"pants.backend.python",
"pants.backend.experimental.python",
"pants.backend.experimental.python.lint.ruff.check",
"pants.backend.experimental.python.lint.ruff.format",
]
[source]
root_patterns = ["/"]
[python]
interpreter_constraints = [">=3.10"]
default_resolve = "poetry"
enable_resolves = true
[python.resolves]
poetry = "poetry.lock"
[python-infer]
imports = true
string_imports = true
[python-repos]
indexes = [
"<https://nexus.company.org/repository/pypi-group/simple>",
"<https://pypi.org/simple>",
]
BUILD file at the top level of project:
poetry_requirements(
name="poetry",
)
And my poetry.lock file starts like this:
[[package]]
name = "altair"
version = "4.2.2"
description = "Altair: A declarative statistical visualization library for Python."
optional = false
python-versions = ">=3.7"
files = [
{file = "altair-4.2.2-py3-none-any.whl", hash = "sha256:8b45ebeaf8557f2d760c5c77b79f02ae12aee7c46c27c06014febab6f849bc87"},
{file = "altair-4.2.2.tar.gz", hash = "sha256:39399a267c49b30d102c10411e67ab26374156a84b1aeb9fcd15140429ba49c5"},
]
[package.dependencies]
..........
........
Did you experience this parse error issue?
Thx in advance!refined-addition-53644
02/05/2025, 9:15 PMpoetry.lock. You will either have to write your own plugin or switch to pants supported lockfile
https://www.pantsbuild.org/2.23/docs/python/overview/lockfileshappy-kitchen-89482
02/06/2025, 1:22 AMstrong-processor-70970
02/06/2025, 1:58 PM