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.

classification
Title: distutils.util.grok_environment_error loses the error message
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.3, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: distutils does not show any error msg when can't build C module extensions due to a missing C compiler
View: 4931
Assigned To: eric.araujo Nosy List: eric.araujo, mgedmin, takluyver, tarek
Priority: normal Keywords:

Created on 2013-10-21 14:05 by mgedmin, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg200785 - (view) Author: Marius Gedminas (mgedmin) * Date: 2013-10-21 14:05
Steps to reproduce:

$ python -c 'from distutils.util import grok_environment_error as e; print(e(IOError("message")))'

What I expect to see:
error: message

What I get instead:
error: None

This is a problem because it hides the error message in a real-life use case: trying to use the latest setuptools in an ancient virtualenv (see [1]).  TL;DR version:
- sysconfig (in the standard library) raises IOError(msg),
- which is then caught and passed throughdistutils.util.grok_environment_error(),
- which then returns an unfriendly 'error: None'.

[1] https://bitbucket.org/pypa/setuptools/issue/89/easy_install-quits-with-error-none-in
msg212908 - (view) Author: Thomas Kluyver (takluyver) * Date: 2014-03-07 22:51
Duplicate of issue 4931. This function should be entirely unnecessary now.
History
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63532
2014-03-07 22:52:27eric.araujosetstatus: open -> closed
superseder: distutils does not show any error msg when can't build C module extensions due to a missing C compiler
resolution: duplicate
stage: resolved
2014-03-07 22:51:23takluyversetnosy: + takluyver
messages: + msg212908
2013-10-21 14:05:17mgedmincreate