Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyPi Server Response 500

I'm trying to regsiter my package on PyPi, with the following command:

pyton setup.py register

But it results in the following error:

Server response (500): <urlopen error [Errno -2] Name or service not known>

I even deleted the ~/.pypirc file and tried again issuing the command but that too results in the same error. My setup.py script is as follows:

from setuptools import setup
from setuptools import find_packages
setup(
        name="xxxxx",
        version="0.0.1",
        author="someone",
        author_email="[email protected]",
        url="https://github.com/someone",
        packages=['folder_name',],
        license="MIT License",
        description = " Sample Description",
        long_description = open("README").read(),
        install_requires = ["python-mwapi"],
)
like image 837
Sibi Avatar asked Jan 08 '13 16:01

Sibi


3 Answers

Importing setup from distutils solved the issue.

Replacing the first two lines with this made it work:

from distutils.core import setup

And once you have registered your package name using distutils.core, you can again go back and use setuptools in your setup.py file. From then on everything seems to work fine.

like image 82
Sibi Avatar answered Sep 18 '22 12:09

Sibi


Check your internet connection, and whether a firewall on the network or on the machine you are working on might be restricting your access.

Next step in troubleshooting is to specify the Pypi server:

python setup.py register -r http://pypi.python.org/pypi

then if still failing mysteriously try to run a local Pypi server (pypiserver) and run the command above while specifying that server.

like image 20
lgautier Avatar answered Sep 17 '22 12:09

lgautier


Adding this to my ~/pypirc worked for me as explained in Uploading to PyPI.

[distutils]
index-servers=pypi

[pypi]
repository = https://pypi.python.org/pypi

[pypi]
username:your_username
password:your_password
like image 24
KhoPhi Avatar answered Sep 19 '22 12:09

KhoPhi