Skip to content
New issue

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

Test upload failing with: 400 Bad Request #718

Closed
tiggerntatie opened this issue Jan 14, 2024 · 3 comments
Closed

Test upload failing with: 400 Bad Request #718

tiggerntatie opened this issue Jan 14, 2024 · 3 comments

Comments

@tiggerntatie
Copy link

Problem description

I am test uploading using the command:
python3.11 -m twine upload --verbose --repository testpypi dist/*

using twine:
twine version 4.0.2 (importlib-metadata: 7.0.1, keyring: 24.3.0, pkginfo: 1.9.6, requests: 2.31.0, requests-toolbelt: 1.0.0, urllib3: 2.1.0)

and receiving the following result:

Uploading distributions to https://test.pypi.org/legacy/
INFO     dist/brython_server-2.3.1-py3-none-any.whl (35.4 MB)                                                                                                                             
INFO     dist/brython-server-2.3.1.tar.gz (34.3 MB)                                                                                                                                       
INFO     Querying keyring for username                                                                                                                                                    
Enter your username: __token__
Enter your password: 
INFO     username: __token__                                                                                                                                                              
INFO     password: <hidden>                                                                                                                                                               
Uploading brython_server-2.3.1-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 37.2/37.2 MB • 00:00 • 102.5 MB/s
INFO     Response from https://test.pypi.org/legacy/:                                                                                                                                     
         400 Invalid distribution file.                                                                                                                                                   
INFO     <html>                                                                                                                                                                           
          <head>                                                                                                                                                                          
           <title>400 Invalid distribution file.</title>                                                                                                                                  
          </head>                                                                                                                                                                         
          <body>                                                                                                                                                                          
           <h1>400 Invalid distribution file.</h1>                                                                                                                                        
           The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>                                                                    
         Invalid distribution file.                                                                                                                                                       
                                                                                                                                                                                          
                                                                                                                                                                                          
          </body>                                                                                                                                                                         
         </html>                                                                                                                                                                          
ERROR    HTTPError: 400 Bad Request from https://test.pypi.org/legacy/                                                                                                                    
         Invalid distribution file.        

The last time I successfully test uploaded this package was July 3, 2022. I will try building the old version and test uploading it again, to see if it is me or pypi, but if someone can suggest a reason I may be seeing this error, I would appreciate it!

@tiggerntatie
Copy link
Author

The new version I am installing is vastly larger than the old, and contains a file that would expand to about 5.8 GB. I'm guessing that might be the problem.

@tiggerntatie
Copy link
Author

The large file should not have been there. Removing it solved the problem. A more informative error would help, but for now, I will consider this issue resolved.

@merwok
Copy link

merwok commented Jan 15, 2024

You can request this enhancement on the warehouse repo: https://github.com/pypi/warehouse/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants