Skip to content

More gracefully fail on pyproject.toml error #411

@eleanorjboyd

Description

@eleanorjboyd

tried going through the "create environment..." flow with a pyproject.toml file but I had an error since my pyproject.toml file was incorrectly formatted. Would be good if the error message was better or it failed more gracefully

 Resolved Python Environment /Users/eleanorboyd/python-envs-scenarios/existing-env-folder/.venv/bin/python
2025-05-14 09:19:39.308 [info] Running: uv pip install --python /Users/eleanorboyd/python-envs-scenarios/existing-env-folder/.venv/bin/python -e /Users/eleanorboyd/python-envs-scenarios/existing-env-folder
2025-05-14 09:19:39.378 [info] error: Failed to extract static metadata from `pyproject.toml`
  Caused by: TOML parse error at line 6, column 8
  |
6 | name = "existing env folder"
  |        ^^^^^^^^^^^^^^^^^^^^^
Not a valid package or extra name: "existing env folder". Names must start and end with a letter or digit and may only contain -, _, ., and alphanumeric characters.


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions