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

Error from pyproject validation are unclear. #1491

Closed
1 task done
SirMartin opened this issue Nov 3, 2022 · 2 comments · Fixed by #1501
Closed
1 task done

Error from pyproject validation are unclear. #1491

SirMartin opened this issue Nov 3, 2022 · 2 comments · Fixed by #1501
Labels
🐛 bug Something isn't working

Comments

@SirMartin
Copy link

SirMartin commented Nov 3, 2022

  • 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

I have an old project that contains a wrong field in the pyproject.toml. If you dig into the log file you can find the error, but the error message that PDM pops out to the console means almost nothing.

I tried to fix myself, but I cannot find a way to do it, I don´t have enough experience with python, or maybe the issue is in the PEP517 validator.

Actual behavior

Shows an unclear error message.

[BuildError]: Call command ['/usr/bin/python3.10', 
'/home/edu/.local/lib/python3.10/site-packages/pep517/in_process/_in_process.py'
, 'get_requires_for_build_editable', '/tmp/tmp3w36cbpv'] return non-zero 
status(1). Make sure the package is PEP 517-compliant, or you can add 
`--no-isolation` to the command.

Expected behavior

Shows the specific error.

pdm.pep517.exceptions.PEP621ValidationError: {'license-expression': ['unknown field']}

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:
  2.2.0
Python Interpreter:
  /usr/local/bin/python (3.9)
Project Root:
  /code
Project Packages:
  /code/__pypackages__/3.9

{
  "implementation_name": "cpython",
  "implementation_version": "3.9.7",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "6.0.2-76060002-generic",
  "platform_system": "Linux",
  "platform_version": "#202210150739~1666289067~22.04~fe0ce53 SMP 
PREEMPT_DYNAMIC Thu O",
  "python_full_version": "3.9.7",
  "platform_python_implementation": "CPython",
  "python_version": "3.9",
  "sys_platform": "linux"
}

@SirMartin SirMartin added the 🐛 bug Something isn't working label Nov 3, 2022
@frostming
Copy link
Collaborator

Can't you see the error with -v flag?

@SirMartin
Copy link
Author

Yes I can, but could be more clear, is not critical but could be improved.

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