We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
gradio cc publish fails on Python 3.9 with the following error:
Uploading distributions to https://upload.pypi.org/legacy/ ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /home/duerr/miniconda3/envs/gradio_customcomponents/lib/python3.9/site-packages/gradio/cli/comma │ │ nds/components/publish.py:196 in _publish │ │ │ │ 193 │ │ │ │ if (not max_version or max_version in p.name) │ │ 194 │ │ │ ] │ │ 195 │ │ │ print(f"Uploading files: {','.join(twine_files)}") │ │ ❱ 196 │ │ │ twine_upload(twine_settings, twine_files) │ │ 197 │ │ except Exception: │ │ 198 │ │ │ console.print_exception() │ │ 199 │ if upload_demo and not demo_dir: │ │ │ │ /home/duerr/miniconda3/envs/gradio_customcomponents/lib/python3.9/site-packages/twine/commands/u │ │ pload.py:123 in upload │ │ │ │ 120 │ repository_url = cast(str, upload_settings.repository_config["repository"]) │ │ 121 │ print(f"Uploading distributions to {repository_url}") │ │ 122 │ │ │ ❱ 123 │ packages_to_upload = [ │ │ 124 │ │ _make_package(filename, signatures, upload_settings) for filename in uploads │ │ 125 │ ] │ │ 126 │ │ │ │ /home/duerr/miniconda3/envs/gradio_customcomponents/lib/python3.9/site-packages/twine/commands/u │ │ pload.py:124 in <listcomp> │ │ │ │ 121 │ print(f"Uploading distributions to {repository_url}") │ │ 122 │ │ │ 123 │ packages_to_upload = [ │ │ ❱ 124 │ │ _make_package(filename, signatures, upload_settings) for filename in uploads │ │ 125 │ ] │ │ 126 │ │ │ 127 │ repository = upload_settings.create_repository() │ │ │ │ /home/duerr/miniconda3/envs/gradio_customcomponents/lib/python3.9/site-packages/twine/commands/u │ │ pload.py:77 in _make_package │ │ │ │ 74 │ filename: str, signatures: Dict[str, str], upload_settings: settings.Settings │ │ 75 ) -> package_file.PackageFile: │ │ 76 │ """Create and sign a package, based off of filename, signatures and settings.""" │ │ ❱ 77 │ package = package_file.PackageFile.from_filename(filename, upload_settings.comment) │ │ 78 │ │ │ 79 │ signed_name = package.signed_basefilename │ │ 80 │ if signed_name in signatures: │ │ │ │ /home/duerr/miniconda3/envs/gradio_customcomponents/lib/python3.9/site-packages/twine/package.py │ │ :117 in from_filename │ │ │ │ 114 │ │ ] │ │ 115 │ │ if missing_fields: │ │ 116 │ │ │ supported_metadata = list(pkginfo.distribution.HEADER_ATTRS) │ │ ❱ 117 │ │ │ raise exceptions.InvalidDistribution( │ │ 118 │ │ │ │ "Metadata is missing required fields: " │ │ 119 │ │ │ │ f"{', '.join(missing_fields)}.\n" │ │ 120 │ │ │ │ "Make sure the distribution includes the files where those fields " │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ InvalidDistribution: Metadata is missing required fields: Name, Version. Make sure the distribution includes the files where those fields are specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2, 2.0, 2.1, 2.2.
See above, the exact same package can be published after upgrading to python 3.10
No response
python 3.9, gradio 4.21.0
I can work around it
The text was updated successfully, but these errors were encountered:
Thanks will take a look! What version of twine are you using @duerrsimon ?
Sorry, something went wrong.
It works with
twine version 5.0.0 (importlib-metadata: 7.0.2, keyring: 24.3.1, pkginfo: 1.10.0, requests: 2.31.0, requests-toolbelt: 1.0.0, urllib3: 2.2.1)
I believe the twine version before was 4.0.2. This is the only twine I could find in dist-info in my lib/python3.9/site-packages
dist-info
lib/python3.9/site-packages
This is a bug with twine: pypa/twine#1070. same thing happened last night during the gradio release.
twine does not set a required version of pkginfo, so when hatch updated, twine didn't know how to read the metadata.
I don't think there's much we can do beyond raising an error in gradio. Will look into that.
gradio cc publish
freddyaboulton
Successfully merging a pull request may close this issue.
Describe the bug
gradio cc publish fails on Python 3.9 with the following error:
Have you searched existing issues? 🔎
Reproduction
See above, the exact same package can be published after upgrading to python 3.10
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: