This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scjody
Recipients dstufft, eric.araujo, scjody
Date 2019-02-01.15:24:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1549034691.01.0.592197242815.issue35882@roundup.psfhosted.org>
In-reply-to
Content
I encountered an error while installing savReaderWriter using pip from a Dockerfile, reported as https://bitbucket.org/fomcl/savreaderwriter/issues/73/pip-install-fails-for-non-utf-8-encoding

This is actually an issue with distutils.

Steps to reproduce:

1. Create the following tree. setup.py is as attached. The .sav file is empty.

./setup.py
./savReaderWriter
./savReaderWriter/test_data
./savReaderWriter/test_data/scheiß Encoding.sav

2. Run LANG=C python setup.py install --record=/tmp/install-record.txt --single-version-externally-managed

Actual output:

running install
running build
running build_py
package init file 'savReaderWriter/__init__.py' not found (or not a regular file)
creating build
creating build/lib
creating build/lib/savReaderWriter
creating build/lib/savReaderWriter/test_data
copying savReaderWriter/test_data/scheiß Encoding.sav -> build/lib/savReaderWriter/test_data
running install_lib
running install_egg_info
running egg_info
creating savReaderWriter.egg-info
writing savReaderWriter.egg-info/PKG-INFO
writing dependency_links to savReaderWriter.egg-info/dependency_links.txt
writing top-level names to savReaderWriter.egg-info/top_level.txt
writing manifest file 'savReaderWriter.egg-info/SOURCES.txt'
'savReaderWriter/test_data/schei\udcc3\udc9f Encoding.sav' not utf-8 encodable -- skipping
reading manifest file 'savReaderWriter.egg-info/SOURCES.txt'
writing manifest file 'savReaderWriter.egg-info/SOURCES.txt'
removing '/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/site-packages/savReaderWriter-1.2.3-py3.6.egg-info' (and everything under it)
Copying savReaderWriter.egg-info to /home/scjody/.pyenv/versions/3.6.5/lib/python3.6/site-packages/savReaderWriter-1.2.3-py3.6.egg-info
running install_scripts
writing list of installed files to '/tmp/install-record.txt'
Traceback (most recent call last):
  File "setup.py", line 9, in <module>
    version='1.2.3',
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/distutils/command/install.py", line 572, in run
    self.record)
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/distutils/cmd.py", line 335, in execute
    util.execute(func, args, msg, dry_run=self.dry_run)
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/distutils/util.py", line 301, in execute
    func(*args)
  File "/home/scjody/.pyenv/versions/3.6.5/lib/python3.6/distutils/file_util.py", line 236, in write_file
    f.write(line + "\n")
UnicodeEncodeError: 'ascii' codec can't encode characters in position 94-95: ordinal not in range(128)

Expected results:

The package is installed and install-record.txt is created.


Related: https://bugs.python.org/issue9561
History
Date User Action Args
2019-02-01 15:24:54scjodysetrecipients: + scjody, eric.araujo, dstufft
2019-02-01 15:24:51scjodysetmessageid: <1549034691.01.0.592197242815.issue35882@roundup.psfhosted.org>
2019-02-01 15:24:50scjodylinkissue35882 messages
2019-02-01 15:24:50scjodycreate