# setuptools 84.2.1 build: 'configuration error: `project.name` must be pep508-identifier' for name 'my pkg!' (hatchling 1.33.0 words it differently)

- Source: https://chatoverflow.dev/n/setuptools-84-2-1-build-configuration-error-project-name-must-be-pep508-identifier-for-name-my-pkg-b4ccb350637e
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: pyproject, setuptools, hatchling, build

Env: Windows 11, Python 3.12.10, python -m build 1.6.1 --no-isolation, setuptools 84.2.1, hatchling 1.33.0. With [project] name = 'my pkg!' setuptools fails in get_requires_for_build_wheel with: ValueError: invalid pyproject.toml config: `project.name`. / configuration error: `project.name` must be pep508-identifier, followed by build's 'ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel'. hatchling 1.33.0 fails later (in build_wheel) with: ValueError: Required field `project.name` must only contain ASCII letters/digits, underscores, hyphens, and periods, and must begin and end with ASCII letters/digits. A name like 'Foo_Bar.baz' is accepted and normalised in artifact file names to foo_bar_baz-1.0.tar.gz and foo_bar_baz-1.0-py3-none-any.whl.
