Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 04-07-2009, 06:31 PM   #1
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
python broken after update on lenny... seems to be related to distutils.extension. ??

To be honest, I can't say for sure that the update is what broke things, but the short version of a long story is this:

had trac running on a webserver running Lenny.
did an apt-get update & upgrade
trac stopped working: Error 500 (Internal server error).
Checked all configs, rechecked configs, checked error logs & saw a TypeError:

[Tue Apr 07 16:09:03 2009] [error] [client]   File "/usr/lib/python2.5/site-packages/Pyrex/Distutils/", line 30, in Extension\n    """
[Tue Apr 07 16:09:03 2009] [error] [client] TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Looked at & saw that line 30 is the last line of the docstring that looks something like:

import distutils.extension as _Extension
class Extension(_Extension.Extension):
    _Extension.Extension.__doc__ + \
    """pyrex_include_dirs : [string]
        list of directories to search for Pyrex header files (.pxd) (in
        Unix form for portability)
    pyrex_create_listing_file : boolean
        write pyrex error messages to a listing (.lis) file.
    pyrex_cplus : boolean
        use the C++ compiler for compiling and linking.
    pyrex_c_in_temp : boolean
        put generated C files in temp directory.
    pyrex_gen_pxi : boolean
        generate .pxi file for public declarations
    """   # This is line 30
If I comment out the "_Extension.Extension.__doc__ + \", trac stops the 500, but it does not display the header (where all the links are).

If I open a python shell, even after doing an "unsetenv PYTHONPATH", I can do this:

Python 2.5.2 (r252:60911, Jan  4 2009, 21:59:32)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import distutils.extension as _Extension
>>> _Extension.Extension.__doc__
'Just a collection of attributes that describes an extension\n    module
At this point, I'm a bit stumped. Anyone have this issue or know what it's related to (and how to solve it )?
Old 04-19-2009, 02:49 AM   #2
Senior Member
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 9
Posts: 1,317

Rep: Reputation: 153Reputation: 153
I recently was having some problems with some programs that depended upon various python packages. I dpkg-reconfigured each one of these dependencies, and the programs once again worked. So, maybe this would work with you as well. I don't know if wild-cards work, but if so, that could make things easier (IE, dpkg-reconfigure python-* ), since most of the python dependencies for Trac seem to be named python hyphen something. Anyway, other than that shot in the dark suggestion, I have no clue as to what the issue is here.

Last edited by mark_alfred; 04-19-2009 at 02:50 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Broken upgrade to Lenny Ephracis Debian 2 02-21-2009 07:49 PM
python update - Unable to load GTK2 Python bindings: No module named gtk itpedersen Linux - Software 2 10-03-2008 03:44 AM
etch to lenny upgrade- any kernel related pitfalls? sonichedgehog Debian 6 01-14-2008 05:31 PM
using distutils to install a python module shanenin Programming 2 11-29-2005 09:44 PM
python: import distutils fails on debian? jpbarto Linux - Software 0 01-18-2004 10:36 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration