Issue #310 resolved

Python 3 and non-ASCII in __init__.py

Walter Dörwald
created an issue

I'm trying to install XIST 4.0 with distribute and get the following error:

{{{

!shell

$ easy_install-3.2 -Z ll-xist==4.0 Searching for ll-xist==4.0 Reading http://pypi.python.org/simple/ll-xist/ Reading http://www.livinglogic.de/Python/xist/ Reading http://www.livinglogic.de/Python/Download.html#xist Reading http://www.livinglogic.de/Python/xist/Download.html Best match: ll-xist 4.0 Downloading http://pypi.python.org/packages/source/l/ll-xist/ll-xist-4.0.zip#md5=f427866d140705047279754aaefe3f9a Processing ll-xist-4.0.zip Writing /tmp/easy_install-09ld7l/ll-xist-4.0/setup.cfg Running ll-xist-4.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-09ld7l/ll-xist-4.0/egg-dist-tmp-xsxpm1 Traceback (most recent call last): File "/usr/local/bin/easy_install-3.2", line 9, in <module> load_entry_point('distribute==0.6.28', 'console_scripts', 'easy_install-3.2')() [...] File "/usr/local/lib/python3.2/distutils/command/build_py.py", line 300, in get_source_files return [module[-1] for module in self.find_all_modules()] File "/usr/local/lib/python3.2/distutils/command/build_py.py", line 295, in find_all_modules m = self.find_package_modules(package, package_dir) File "/usr/local/lib/python3.2/distutils/command/build_py.py", line 217, in find_package_modules self.check_package(package, package_dir) File "/usr/local/lib/python3.2/site-packages/distribute-0.6.28-py3.2.egg/setuptools/command/build_py.py", line 220, in check_package if 'declare_namespace' not in f.read(): File "/usr/local/lib/python3.2/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 118: ordinal not in range(128) }}}

The problem seems to be that src/ll/init.py contains non-ASCII characters. However it also contains a proper # -- coding: utf-8 -- line (which should be neccessary with Python 3)

Comments (7)

  1. Log in to comment