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

upload to testpypi.python.org #189

Closed
mojeto opened this issue Jul 5, 2016 · 4 comments
Closed

upload to testpypi.python.org #189

mojeto opened this issue Jul 5, 2016 · 4 comments

Comments

@mojeto
Copy link

mojeto commented Jul 5, 2016

Hi,
I'm trying to upload package into testpypi.python.org.
my ~/.pypirc file:

[distutils]
index-servers=
pypi

[pypi]
repository = https://testpypi.python.org/pypi
username = mojeto
password = ........

I run 'twine register dist/....' it works and register my package to testpypi.python.org.
Next I run 'twine upload dist/*'
that fails with

Uploading distributions to https://testpypi.python.org/pypi
ValueError: No JSON object could be decoded

I debug it and I think problem is here https://github.com/pypa/twine/blob/master/twine/repository.py#L163
It tries load information about package from pypi.python.org, but I register my package on testpypi.python.org only so it fails.

@annaraven
Copy link
Contributor

Hi Mojeto:

Have you tried specifying the repo when you upload? By default twine will upload to pypi. If you want to specifying, change your pypirc to something like:

[pypi]
repository = https://pypi.python.org/pypi
username = mojeto
password = ........

[testpypi] <---Note the different repo name
repository = https://testpypi.python.org/pypi
username = mojeto
password = ........

Then change your command line to specify the repo with:
twine upload -r testpypi dist/*

@sigmavirus24
Copy link
Member

@annaraven thanks for your help! @mojeto however has identified a real bug in the code. :)

@dstufft
Copy link
Member

dstufft commented Jul 5, 2016

#192 will probably fix this.

@dstufft
Copy link
Member

dstufft commented Jul 5, 2016

Fixed in afc9956.

@dstufft dstufft closed this as completed Jul 5, 2016
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

4 participants