[Python-bugs-list] [ python-Bugs-233259 ] Ugly traceback for DistutilsPlatformError

noreply@sourceforge.net noreply@sourceforge.net
Mon, 04 Nov 2002 05:54:38 -0800


Bugs item #233259, was opened at 2001-02-20 11:23
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=233259&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Ward (gward)
Assigned to: Michael Hudson (mwh)
Summary: Ugly traceback for DistutilsPlatformError

Initial Comment:
>From Chad Lester:

> I was setting up a new redhat machine, and had forgotten to install the
> python-devel rpm.  The distutils provide a fairly ugly stack trace / error
> message.  Luckily, it meant something to me... but it's not terribly user
> friendly!
>    
> ...
>   File "/usr/lib/python1.5/site-packages/distutils/sysconfig.py", line
> 368, in get_config_vars
>     func()
>   File "/usr/lib/python1.5/site-packages/distutils/sysconfig.py", line
> 280, in _init_posix
>     raise DistutilsPlatformError, my_msg
> distutils.errors.DistutilsPlatformError: invalid Python
> installation: unable to open /usr/lib/python1.5/config/Makefile (No such
> file or directory)
> 
> 



----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2002-11-04 08:54

Message:
Logged In: YES 
user_id=11375

A simple fix is in the attached patch; it simply adds DistutilsPlatformError to the list of the exception classes caught 
by core.setup().  

However, maybe that exception handler should 
catch DistutilsError, instead of listing a few particular subclasses of it.  Some subclasses represent internal errors or a bad setup file, but 
as users can always get the full traceback by setting the DISTUTILS_DEBUG environment variable, there seems little need to 
ever show the full traceback by default.


----------------------------------------------------------------------

Comment By: A.M. Kuchling (akuchling)
Date: 2001-12-06 11:18

Message:
Logged In: YES 
user_id=11375

Greg, I don't understand your last comment on this bug.  
Surely the traceback will still be ugly for people running
Python 2.2 or whatever who don't have the python-devel RPM
installed?  I don't see how this is only a 1.5.2 or a
"installing Distutils" question. 


----------------------------------------------------------------------

Comment By: Greg Ward (gward)
Date: 2001-02-20 11:24

Message:
This only applies for people installing Distutils
under Python 1.5.2, so it will only be fixed if
there is another Distutils release to support 1.5.2 --
which is unlikely.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=233259&group_id=5470