When publishing a package to PyPI, "HTTP Error: 400 Client Error: File already exists." Is displayed.

Introduction

I posted my own package to PyPI with reference to this article.

At this time, I tried to post the updated package

twine upload dist/*
HTTPError: 400 Client Error: File already exists. See https://pypi.org/help/#file-name-reuse for url: https://upload.pypi.org/legacy

Message was output and the upload could not be performed.

counter-measure

twine upload dist/*

Command uses the upload function of twine Attempts to post all whl files under dist.

I don't get an error for things I haven't posted yet, like ʻACO Crawler-0.2.0-py3-none-any.whz. I will try to post ʻACO Crawler-0.1.0-py3-none-any.whl etc. that I have already posted again.

Therefore,

twine upload --skip-existing dist/*

With the above option, you won't get an error because you won't post anything that's already on PyPI.

Recommended Posts

When publishing a package to PyPI, "HTTP Error: 400 Client Error: File already exists." Is displayed.
Output timing is incorrect when standard (error) output is converted to a file in Python
When "ERROR: HTTP is not supported." Is displayed in mpsyt
What to do when a warning message is displayed in pip list
It is better to use NTFS when connecting SSD to Linux to create a file server.
What to do when gdal_merge creates a huge file
I want to find a popular package on PyPi
Error in rsync to mount.cifs shared folder: File exists (17)
How to create a new file when the specified file does not exist — write if the file exists
Python> __init__.py> Required to handle the specified directory as a package (empty file is acceptable)