Skip to content

HTTPError: 400 Client Error: Invalid distribution file. for url: https://upload.pypi.org/legacy/ #674

@zqfan

Description

@zqfan

Using same procedure, I can upload other packages.
Using same procedure, I can upload my project's history tag sucessfully, but fail with the latest tag of my project
no change in setup.py & setup.cfg, only add and change some python files.
it is very odd, and no more information returned after twine failed with http 400

Your Environment

Thank you for taking the time to report an issue.

To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.

  1. Your operating system:
    cat /etc/redhat-release
    CentOS Linux release 7.7.1908 (Core)

  2. Version of python you are running:

python --version

python3 --version
Python 3.6.8

  1. How did you install twine? Did you use your operating system's package manager or pip or something else?
    pip show twine
    Name: twine
    Version: 1.11.0
    Summary: Collection of utilities for publishing packages on PyPI
    Home-page: https://twine.readthedocs.io/
    Author: Donald Stufft and individual contributors
    Author-email: [email protected]
    License: Apache License, Version 2.0
    Location: /usr/local/lib/python3.6/site-packages
    Requires: requests-toolbelt, requests, pkginfo, tqdm, setuptools
    Required-by:
    python3 -m twine upload dist/*
  2. Version of twine you have installed (include complete output of):
twine --version

twine --version
twine version 1.11.0 (pkginfo: 1.7.1, requests: 2.27.1, setuptools: 57.4.0,
requests-toolbelt: 0.9.1, tqdm: 4.62.2)

  1. Which package repository are you targeting?
    tccli
    https://github.com/TencentCloud/tencentcloud-cli
    3.0.894.1 fail to upload, while 3.0.890.1 is ok

If you're having issues uploading a specific package, you must include a copy of the following:

  • The package's PKG-INFO file
  • A redacted version of your .pypirc file (REMOVE ALL USERNAMES & PASSWORDS BEFORE UPLOADING)

The Issue

Please describe the issue that you are experiencing.

python3 -m twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Uploading tccli-3.0.894.1-py2.py3-none-any.whl
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6.58M/6.58M [00:04<00:00, 1.45MB/s]
HTTPError: 400 Client Error: Invalid distribution file. for url: https://upload.pypi.org/legacy/

Steps to Reproduce

If the issue is predictable and consistently reproducible, please list the steps here.

git clone https://github.com/TencentCloud/tencentcloud-cli
git checkout 3.0.894.1
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions