Hi. So I was messing about with the pants.toml and...
# general
Hi. So I was messing about with the pants.toml and ran into a very cryptic error message:
Copy code
➜ ./pants --no-pantsd -l=debug  generate-lockfiles
06:23:00.28 [WARN] /Users/vish/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.Z3K0Pi/install/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/specifiers.py:255: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release

06:23:00.28 [ERROR] 1 Exception encountered:

  InvalidRequirement: Parse error at "'='": Expected string_end
Wasn’t helping. Anyways, after messing about the toml file a bit more and checking git diffs, I was able to resolve it. What I had done was this:
Copy code
airflow-default = "CPython>=3.7.10, <3.8"
The correct way is to set it as an array:
Copy code
airflow-default = ["CPython>=3.7.10, <3.8"]
I think these kinds of mistakes can occur. if the error message pointed to line or even say the error was in toml file, I would have been able to resolve it more easily. It isn’t critical, but a nice usability improvement 🙂
Maybe create a ticket for it? https://github.com/pantsbuild/pants/issues The dream is this is discovered by linters or VSCode intellisense, which isn't too too far away, but still a reasonable distance.
yeah, that would be great! Filed here: https://github.com/pantsbuild/pants/issues/17848
👍 1