It seems to be a version issue as shown in this post: version issue with twine. Two main points of takeaway is to check your twine and pkginfo version. You can do this by python -m pip show <package name>
. Make sure that twine version is <= 6.0.1 ad pkginfo is the latest version 1.12.0.