[New-bugs-announce] [issue14021] Write pkg_info with local encoding(GBK) will be a problem.

勇刚 罗 report at bugs.python.org
Wed Feb 15 17:58:45 CET 2012


New submission from 勇刚 罗 <luoyonggang at gmail.com>:

D:\CI\bld\vcs\pygit2>python setup.py install
Find C:\Python32\python.exe
Using C:\Python32\python.exe
running install
running bdist_egg
running egg_info
writing pygit2.egg-info\PKG-INFO
Traceback (most recent call last):
  File "setup.py", line 106, in <module>
    **kwargs)
  File "C:\Python32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Python32\lib\distutils\dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "C:\Python32\lib\distutils\dist.py", line 936, in run_command
    cmd_obj.run()
  File "C:\Python32\lib\site-packages\distribute-0.6.24-py3.2.egg\setuptools\command\install.py", line 73, in run
    self.do_egg_install()
  File "C:\Python32\lib\site-packages\distribute-0.6.24-py3.2.egg\setuptools\command\install.py", line 93, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Python32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Python32\lib\distutils\dist.py", line 936, in run_command
    cmd_obj.run()
  File "C:\Python32\lib\site-packages\distribute-0.6.24-py3.2.egg\setuptools\command\bdist_egg.py", line 172, in run
    self.run_command("egg_info")
  File "C:\Python32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Python32\lib\distutils\dist.py", line 936, in run_command
    cmd_obj.run()
  File "C:\Python32\lib\site-packages\distribute-0.6.24-py3.2.egg\setuptools\command\egg_info.py", line 172, in run
    writer(self, ep.name, os.path.join(self.egg_info,ep.name))
  File "C:\Python32\lib\site-packages\distribute-0.6.24-py3.2.egg\setuptools\command\egg_info.py", line 384, in write_pkg_info
    metadata.write_pkg_info(cmd.egg_info)
  File "C:\Python32\lib\distutils\dist.py", line 1015, in write_pkg_info
    self.write_pkg_file(pkg_info)
  File "C:\Python32\lib\distutils\dist.py", line 1031, in write_pkg_file
    file.write('Author: %s\n' % self.get_contact() )
UnicodeEncodeError: 'gbk' codec can't encode character '\xf1' in position 20: illegal multibyte sequence

D:\CI\bld\vcs\pygit2>
It's better to use utf8 instead.

----------
assignee: tarek
components: Distutils
messages: 153415
nosy: eric.araujo, tarek, 勇刚.罗
priority: normal
severity: normal
status: open
title: Write pkg_info with local encoding(GBK) will be a problem.
type: crash
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14021>
_______________________________________


More information about the New-bugs-announce mailing list