Issue #113 resolved

LookupError: unknown encoding on install under OsX 10.8.5

created an issue

I'm attempting a first time install according to according to the doc:

sudo wget --no-check-certificate -O - | sudo python

but the following error occurs:

Extracting in /tmp/tmpMfVhxV
Now working in /tmp/tmpMfVhxV/setuptools-1.4
Installing Setuptools
running install
running bdist_egg
running egg_info
writing dependency_links to setuptools.egg-info/dependency_links.txt
writing requirements to setuptools.egg-info/requires.txt
writing setuptools.egg-info/PKG-INFO
writing top-level names to setuptools.egg-info/top_level.txt
writing entry points to setuptools.egg-info/entry_points.txt
Traceback (most recent call last):
  File "", line 204, in <module>
    dist = setuptools.setup(**setup_params)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 152, in setup
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 953, in run_commands
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 972, in run_command
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 73, in run
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 93, in do_egg_install
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 326, in run_command
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 972, in run_command
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 177, in run
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 326, in run_command
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/", line 972, in run_command
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 187, in run
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 230, in find_sources
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 296, in run
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 335, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 18, in walk_revctrl
    for item in ep.load()(dirname):
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/", line 58, in _default_revctrl
    for item in finder(dirname):
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/", line 419, in svn_finder
    info = SvnInfo.load(dirname)
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/", line 221, in load
    code, data = _run_command(['svn', 'info', normdir])
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/", line 41, in _run_command
    data = decode_as_string(data, encoding)
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/", line 93, in decode_as_string
    text = text.decode(encoding)
LookupError: unknown encoding: 
Something went wrong during the installation.
See the error message above.

Comments (7)

  1. philip_thiem

    what does

    python -c "import locale; print(locale.getpreferredencoding())"

    return? (If you would check please). This is likely related to the other Mac Encoding bug, just your setup/python version is likely different. So it would be useful for me to know.

  2. philip_thiem Basically for determining the terminal encoding:

    1. Try getpreferredencoding
    2. If that is US_ASCII or None try the encoding from getdefaultlocale() if that was a "fallback" because python couldn't figure it out from the environment or OS, this wll result in None.
    3. If not none, then make sure python actually knows about the encoding.
    4. On the event of an error or unknown codec, revert to fallbacks
    5. That is, on darwin try utf-8 everything else ASCII. Also on the darwin and mac-roman, switch to utf-8 this was a bug on older pythons.
  3. Log in to comment