Skip to content
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
ghost opened this issue Nov 21, 2013 · 7 comments
Closed

LookupError: unknown encoding on install under OsX 10.8.5 #113

ghost opened this issue Nov 21, 2013 · 7 comments

Comments

@ghost
Copy link

ghost 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.

@ghost
Copy link
Author

ghost 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.

@ghost
Copy link
Author

ghost 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.

@ghost
Copy link
Author

ghost 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?

@ghost
Copy link
Author

ghost 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.

@ghost
Copy link
Author

ghost commented Nov 23, 2013

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


Update changelog. Fixes #105 and Fixes #113.

@ghost
Copy link
Author

ghost commented Nov 23, 2013

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


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

@ghost
Copy link
Author

ghost 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.

@ghost ghost added major bug labels Mar 29, 2016
@ghost ghost closed this as completed Mar 29, 2016
jaraco added a commit that referenced this issue Jan 30, 2022
Fixes #112 install command doesn't use platform in nt_user scheme
jaraco added a commit that referenced this issue Feb 4, 2023
--HG--
extra : amend_source : 10cadb252bc504ef25c9f9cf7f3cdc5bf03fd367
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants