New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LookupError: unknown encoding on install under OsX 10.8.5 #113

Closed
bb-migration opened this Issue Nov 21, 2013 · 7 comments

Comments

Projects
None yet
1 participant
@bb-migration

bb-migration commented Nov 21, 2013

Originally reported by: coolnodje (Bitbucket: coolnodje, GitHub: Unknown)


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

#!bash

sudo wget --no-check-certificate https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

but the following error occurs:

#!bash

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 "setup.py", line 204, in <module>
    dist = setuptools.setup(**setup_params)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/install.py", line 93, in do_egg_install
    self.run_command('bdist_egg')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/bdist_egg.py", line 177, in run
    self.run_command("egg_info")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/egg_info.py", line 187, in run
    self.find_sources()
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/egg_info.py", line 230, in find_sources
    mm.run()
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/egg_info.py", line 296, in run
    self.add_defaults()
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/egg_info.py", line 335, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/sdist.py", line 18, in walk_revctrl
    for item in ep.load()(dirname):
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/command/sdist.py", line 58, in _default_revctrl
    for item in finder(dirname):
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/svn_utils.py", line 419, in svn_finder
    info = SvnInfo.load(dirname)
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/svn_utils.py", line 221, in load
    code, data = _run_command(['svn', 'info', normdir])
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/svn_utils.py", line 41, in _run_command
    data = decode_as_string(data, encoding)
  File "/private/tmp/tmpMfVhxV/setuptools-1.4/setuptools/svn_utils.py", line 93, in decode_as_string
    text = text.decode(encoding)
LookupError: unknown encoding: 
Something went wrong during the installation.
See the error message above.

@bb-migration

This comment has been minimized.

bb-migration commented Nov 21, 2013

Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown):


what does

#!bash

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.

@bb-migration

This comment has been minimized.

bb-migration commented Nov 21, 2013

Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown):


https://bitbucket.org/pypa/setuptools/pull-request/26/svn-encoding-issues/diff
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.
@bb-migration

This comment has been minimized.

bb-migration commented Nov 22, 2013

Original comment by coolnodje (Bitbucket: coolnodje, GitHub: Unknown):


#!bash

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

returns nothing.

Did your #26 issue fix made it to the version you get from
https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py already?

@bb-migration

This comment has been minimized.

bb-migration commented Nov 22, 2013

Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown):


Yes that looks like setuptools 1.4, so the fix for Issue #26 should be in there. Pull request 26 which should take care of this and #105 has not yet.

@bb-migration

This comment has been minimized.

bb-migration commented Nov 23, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Update changelog. Fixes #105 and Fixes #113.

@bb-migration

This comment has been minimized.

bb-migration commented Nov 23, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


1.4.1 includes these fixes. Please test and confirm the fixes.

@bb-migration

This comment has been minimized.

bb-migration commented Nov 27, 2013

Original comment by coolnodje (Bitbucket: coolnodje, GitHub: Unknown):


works great! thx.

I installed it on OS X 10.9, it worked as a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment