[Python-Dev] New PyPI broken package editing

Walter Dörwald walter at livinglogic.de
Wed Mar 23 12:07:58 CET 2005

martin at v.loewis.de wrote:

> Zitat von Walter Dörwald <walter at livinglogic.de>:
>>I've uploaded a new package to the new PyPI. Editing this
>>new packages gives me a unicode error. The URL is
> I see that the package is online now, so I assume that
> it now worked?

OK, I've deleted the files and the packages. Running "setup.py register"
with author=u"Walter Dörwald" in setup.py gives me:

running register
Using PyPI login from /home/walter/.pypirc
Server response (500): Internal Server Error

Using author=u"Walter Dörwald".encode("utf-8") in setup.py works.

I'm not sure if this is the right approach. The encoding I specify in 
setup.py should be independent of the encoding used between distutils 
and PyPI to communicate on the wire. I.e. the author (and maintainer) 
argument should always be unicode. When str is passed, this is treated 
as any other str in a unicode context, it is decoded using the default 
encoding. This would fix another problem: It would make it nearly 
impossible to send a request to PyPI with the wrong encoding, because 
any encoding problems are sorted out completely on the client side.

> [...]
> As for the uploads: you'll have noticed that it put the
> sdist files into packages/2.5; this is not supposed to
> happen. If you delete the files, and reupload them with
> the current CVS, the files should go into /packages/source.

OK, I've re-uploaded the packages.

BTW, uploading the packages a second time leads to the following problem:
running upload
Submitting dist/ll-ansistyle-0.6.1.tar.bz2 to http://www.python.org/pypi
Upload failed (500): There's been a problem with your request
Submitting dist/ll-ansistyle-0.6.1.tar.gz to http://www.python.org/pypi
Upload failed (500): There's been a problem with your request

Is there a way to display the HTTP response by PyPI?

Editing the package is still broken. The link "edit" on the page 
http://www.python.org/pypi/ll-ansistyle/0.6.1 gives:

There's been a problem with your request

exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
position 92: ordinal not in range(128)

    Walter Dörwald

More information about the Python-Dev mailing list