Twine/PyPI – Invalid distribution file

I am trying to upload my package (SyntenyQC) to test pypi as described here.

I have installed twine and build as described in the link, and got a dist folder with a wheel and gz file. However, twine errors with Invalid distribution file.

I am copying my token via right-click not ctrl v (avoiding this error). I noticed that the printout of twine is slightly different from that of the tutorial, which may be relevant:

tutorial in link:

Uploading distributions to https://test.pypi.org/legacy/
Enter your username: __token__
Uploading example_package_YOUR_USERNAME_HERE-0.0.1-py3-none-any.whl
...

my traceback

Uploading distributions to https://test.pypi.org/legacy/
Enter your API token:                                    ###this line###
Uploading syntenyqc-0.0.1-py3-none-any.whl
...

My full traceback is below. I suspect the issue may be that I am installing from within a venv (pip_env) so will try repeating everything from my base env. In the meantime, can anyone else suggest any obvious fixes?

Thanks!

Traceback (path is a replacement for long paths):

(pip_env) C:Usersusername.spyder-py3SyntenyQC>pip install --upgrade twine
Requirement already satisfied: twine in path
Requirement already satisfied: urllib3>=1.26.0 in path (from twine) (1.26.16)
Requirement already satisfied: pkginfo>=1.8.1 in path (from twine) (1.10.0)
Requirement already satisfied: keyring>=15.1 in path (from twine) (23.13.1)
Requirement already satisfied: importlib-metadata>=3.6 in path (from twine) (6.0.0)
Requirement already satisfied: requests>=2.20 in path (from twine) (2.31.0)
Requirement already satisfied: readme-renderer>=35.0 in path (from twine) (44.0)
Requirement already satisfied: requests-toolbelt!=0.9.0,>=0.8.0 in path (from twine) (1.0.0)
Requirement already satisfied: rfc3986>=1.4.0 in path (from twine) (2.0.0)
Requirement already satisfied: rich>=12.0.0 in path (from twine) (13.7.1)
Requirement already satisfied: zipp>=0.5 in path (from importlib-metadata>=3.6->twine) (3.11.0)
Requirement already satisfied: jaraco.classes in path (from keyring>=15.1->twine) (3.2.1)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in path (from keyring>=15.1->twine) (0.2.0)
Requirement already satisfied: nh3>=0.2.14 in path (from readme-renderer>=35.0->twine) (0.2.18)
Requirement already satisfied: Pygments>=2.5.1 in path (from readme-renderer>=35.0->twine) (2.15.1)
Requirement already satisfied: docutils>=0.21.2 in path (from readme-renderer>=35.0->twine) (0.21.2)
Requirement already satisfied: charset-normalizer<4,>=2 in path (from requests>=2.20->twine) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in path (from requests>=2.20->twine) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in path (from requests>=2.20->twine) (2024.6.2)
Requirement already satisfied: markdown-it-py>=2.2.0 in path (from rich>=12.0.0->twine) (3.0.0)
Requirement already satisfied: mdurl~=0.1 in path (from markdown-it-py>=2.2.0->rich>=12.0.0->twine) (0.1.2)
Requirement already satisfied: more-itertools in path (from jaraco.classes->keyring>=15.1->twine) (8.12.0)


(pip_env) C:Usersusername.spyder-py3SyntenyQC>pip install --upgrade build
Requirement already satisfied: build in path (1.2.1)
Requirement already satisfied: pyproject_hooks in path (from build) (1.0.0)
Requirement already satisfied: colorama in path (from build) (0.4.6)
Requirement already satisfied: packaging>=19.1 in path (from build) (23.0)
Requirement already satisfied: tomli>=1.1.0 in path (from build) (2.0.1)

(pip_env) C:Usersusername.spyder-py3SyntenyQC>python -m build
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - hatchling
* Getting build dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - hatchling
* Getting build dependencies for wheel...
* Building wheel...
Successfully built syntenyqc-0.0.1.tar.gz and syntenyqc-0.0.1-py3-none-any.whl

(pip_env) C:Usersusername.spyder-py3SyntenyQC>python -m twine upload --repository testpypi dist/*
Uploading distributions to https://test.pypi.org/legacy/
Enter your API token:
Uploading syntenyqc-0.0.1-py3-none-any.whl
100% ---------------------------------------- 3.2/3.2 MB • 00:03 • 902.8 kB/s
WARNING  Error during upload. Retry with the --verbose option for more details.
ERROR    HTTPError: 400 Bad Request from https://test.pypi.org/legacy/
         Invalid distribution file.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật