1. PyPA
  2. Python Packaging Authority Projects
  3. pypi
  4. Issues

Issues

Issue #56 wontfix

Can't upload (wrong password)

smontanaro
created an issue

I'm trying to upload a distribution, but it complains:

Upload failed (401): Incorrect password

I checked the password in ~/.pypirc. It is the same as the password I used to log into pypi.python.org. What am I doing wrong?

Comments (7)

  1. Mariano Reingart

    Just for the record, I had a similar issue:

    Server response (401): basic auth failed

    But, capturing the packets with wireshark (http against testpypi.python.org), the server was giving a more helpful response:

    401 Incomplete registration; check your email

    Of course, I had a incoming mail from admin@mail.pypi.python.org requesting to finish the registration (subject "Complete your PyPI registration"). Following the provided link, it worked ok.

    BTW, --show-response didn't worked for me:

    reingart@s5ultra:~/pyfpdf$ python setup.py register -r test --show-response
    running register
    running check
    Registering fpdf to https://testpypi.python.org/pypi
    Traceback (most recent call last):
      File "setup.py", line 38, in <module>
        keywords=["pdf", "unicode", "png", "jpg", "ttf"],
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/distutils/command/register.py", line 57, in run
        self.send_metadata()
      File "/usr/lib/python2.7/distutils/command/register.py", line 168, in send_metadata
        auth)
      File "/usr/lib/python2.7/distutils/command/register.py", line 303, in post_to_server
        data = e.fp.read()
    AttributeError: 'NoneType' object has no attribute 'read'
    

    I did something wrong or this is a bug? (let me know if you're interested, I'll try to provide a patch in that case)

  2. Sébastien Celles

    I notice that

    changing

    [distutils]
    index-servers =
        pypi
        pypitest
    
    [pypi]
    username: user
    password: ****
    
    [pypitest]
    username: user
    password: ****
    

    to

    [distutils]
    index-servers =
        pypi
        pypitest
    
    [pypi]
    username:user
    password:****
    
    [pypitest]
    username:user
    password:****
    

    removing space fix the problem

    It seems that it's still ok for registering with blank space but not for uploading.

    But I may be wrong

    Kind regards

  3. Log in to comment