Invalid distribution metadata; `UNKNOWN` package name
See original GitHub issueHey guys,
i have a problem when executing twine check dist/*. Since I am completely new to publishing packages I cannot fix this error.
But one by one:
- Your operating system: Mac OS
- Version of python you are running:
python 3.7.6
- How did you install twine? Did you use your operating system’s package manager or pip or something else?
pip install twine
- Version of twine you have installed (include complete output of):
twine version 3.7.1 (importlib_metadata: 4.10.0, pkginfo: 1.8.2, requests:
2.26.0, requests-toolbelt: 0.9.1, tqdm: 4.42.1)
- Which package repository are you targeting? pypi
The Issue
Please describe the issue that you are experiencing.
After building the package with python3 -m build . a MANIFEST, ipypetrinet-1.0.0.tar.gz and UNKNOWN-0.0.0-py2.py3-none-any.whl file is successfully created. After that i tried twine check dist/* which throws the following error:
Checking dist/UNKNOWN-0.0.0-py2.py3-none-any.whl: InvalidDistribution: Invalid distribution metadata.
This version of twine supports Metadata-Version 1.0, 1.1, 1.2, 2.0, 2.1, and 2.2
But when I unzip UNKNOWN-0.0.0-py2.py3-none-any.whl and look into the files, the only file containing the keyword Metadata-Version has an appropriate Metadata-Version of 2.1. To visualize this METADATA-file I will paste the first few lines below:
Metadata-Version: 2.1
Name: UNKNOWN
Version: 0.0.0
Summary: UNKNOWN
Home-page: UNKNOWN
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Does anyone know how to deal with this? Any help is appreciated! Thanks in advance.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (7 by maintainers)
Top Related StackOverflow Question
Alternatively, if there’s a conflict between the JS and the Python use of
dist/, then you can specify a different directory for Python:In that case, you’d want to add
py_distto your.gitignore.Well I am satisfied and publishing worked, so that’s great. And thanks, I will definitely try one of these options above if i update it in a while!
However, I’ll leave the issue open for @bhrutledge in order to have a look at the error message. So feel free to close this issue whenever you like.