Package Registry returning 400

I’m trying to write a Python package to the package registry in my project, but I continually see the error:

TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*
Uploading distributions to https://gitlab.com/api/v4/projects/22272785/packages/pypi
NOTE: Try --verbose to see response content.
HTTPError: 400 Bad Request from https://gitlab.com/api/v4/projects/22272785/packages/pypi
Bad Request

My runners are on Gitlab, and this has worked several times before. Going to the URL directly says “invalid package ID”, yet that is the ID displayed in the package registry page.

Is this a problem with my setup or is something about the Package Registry broken?

Also getting this error when trying to upload a python package to the internal pypi registry. I am running Gitlab through Docker and just done an upgrade to 13.11.4

For anyone coming from Google: I’ve found that GitLab’s pypi don’t allow overwriting lib versions. I bumped my lib version and stopped getting this error.