How to eliminate 500 response from pypi when trying to release a new version of a package?

I am trying to release a new version of the package for pypi. This uses python 2.7, and I'm currently using pythons 2.6 / 2.7 for consumption.

The current version for the package in question is 0.0.2-1. ( -1 was the assembly tag convention that I read somewhere, I am changing this practice to use b for beta , which is more relevant.)

Basically, if I have a combination of version (in the setup() call) and an assembly tag (from setup.cfg ) that is something other than the current version already on pypi, both register and <t27 command>:

 ethan@walrus :~/source/python-mandrel$ python setup.py register running register running egg_info writing requirements to mandrel.egg-info/requires.txt writing mandrel.egg-info/PKG-INFO writing top-level names to mandrel.egg-info/top_level.txt writing dependency_links to mandrel.egg-info/dependency_links.txt writing entry points to mandrel.egg-info/entry_points.txt reading manifest file 'mandrel.egg-info/SOURCES.txt' writing manifest file 'mandrel.egg-info/SOURCES.txt' running check Registering mandrel to http://pypi.python.org/pypi Server response (500): There been a problem with your request 

This is with version 0.0.3 and build tag b .

But if I applied this patch:

 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,3 @@ [egg_info] -tag_build = b +tag_build = -1 diff --git a/setup.py b/setup.py index 14761cf..beb8278 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import os setup( name = "mandrel", - version = "0.0.3", + version = "0.0.2", author = "Ethan Rowe", author_email = " ethan@the-rowes.com ", description = ("Provides bootstrapping for sane configuration management"), 

Then a call to register (and presumably upload ) will succeed:

 ethan@walrus :~/source/python-mandrel$ python setup.py register running register ... running check Registering mandrel to http://pypi.python.org/pypi Server response (200): OK 

If I change the assembly tag to -2 , let's say the register call ends again. This suggests that the failure is associated with any general version of the string that pypi is not yet aware of.

Unfortunately, the --show-response option when using upload useless if the server responds with code 500; The distutils ' upload command simply reports that an error has occurred on the server and nothing useful has happened.

Any suggestions on what I can do to troubleshoot?

+4
source share
1 answer

I also have a 500 error, a problem for this with a diagnosis of them: https://sourceforge.net/tracker/index.php?func=detail&aid=3573564&group_id=66150&atid=513503 .

I debugged it using pdb. Apparently the show-response option is not really implemented. I put "import pdb; pdb.set_trace ()" on my Python dist, in distutils/command/register.py on line 291, which in my version is inside the post_to_server() method. I do "print req.data" right here, and then "next" through it to see the answer set inside the catch exception.

+2
source

Source: https://habr.com/ru/post/1437204/


All Articles