Issue #131 resolved

Unicode in author name

Atamert Ölçgen
created an issue

When I use u'Atamert \xd6l\xe7gen' as the author argument to setup() I get the following error with python setup.py sdist register:

{{{

!shell

Traceback (most recent call last): File "setup.py", line 25, in <module> 'Topic :: Internet :: WWW/HTTP :: Dynamic Content'] File "/usr/lib/python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/usr/lib/python2.5/distutils/command/sdist.py", line 151, in run self.make_distribution() File "/usr/lib/python2.5/distutils/command/sdist.py", line 447, in make_distribution self.make_release_tree(base_dir, self.filelist.files) File "/usr/lib/python2.5/distutils/command/sdist.py", line 430, in make_release_tree self.distribution.metadata.write_pkg_info(base_dir) File "/usr/lib/python2.5/distutils/dist.py", line 1076, in write_pkg_info self.write_pkg_file(pkg_info) File "/usr/lib/python2.5/distutils/dist.py", line 1094, in write_pkg_file file.write('Author: %s\n' % self.get_contact() ) UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 16: ordinal not in range(128)

}}}

When I encode the string UTF8 I get the following error:

{{{

Traceback (most recent call last): File "setup.py", line 25, in <module> 'Topic :: Internet :: WWW/HTTP :: Dynamic Content'] File "/usr/lib/python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/usr/lib/python2.5/distutils/command/register.py", line 48, in run self.send_metadata() File "/usr/lib/python2.5/distutils/command/register.py", line 162, in send_metadata auth) File "/usr/lib/python2.5/distutils/command/register.py", line 257, in post_to_server value = unicode(value).encode("utf-8") UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

}}}

These commands are run in a virtualenv with distribute & pip installed. The project is http://github.com/muhuk/django-inviting. Is there a way to not asciify my name and still register with PyPI?

Comments (3)

  1. Log in to comment