Le 16/12/2012 10:52, Jonathan Woithe a écrit :
Around a week ago, the web interface on subversion.ffado.org went down.  
So, this is an old Trac instance. Can you get the exact version ? I couldn't tell from the page and headers.
hosting provider identified what they throught was an error in the .htaccess
file and apparently "corrected" it.  However, things are still not right,
and attempting to access


results in an error dump from a python script.
Maybe there was an error in .htaccess, but this one happens in the DB connection.

I don't know python well enough to determine what the error might be, or
(most importantly) how we might go about fixing it.  It would be great if
someone familiar with python could take a quick look at the errors we're
getting and advise on the best course of action to take in order to get this
operating again.
In such Python dumps, the innermost call (where the exception is primarily raised) is at the end.
The trac can't connect to the DB any more.

 /home/ffado/packages/lib/python2.3/site-packages/trac/db/mysql_backend.py in __init__(self=<trac.db.mysql_backend.MySQLConnection object>, path=u'ffadotracdb', user=u'ffadotrac', password=*******, host=u'trac.ffado.org', port=3306, params={})
  144         # on 1.2.1 made.  -dilinger
  145         if (self._mysqldb_gt_or_eq((1, 2, 1))):
  146             cnx = MySQLdb.connect(db=path, user=user, passwd=password,
  147                                   host=host, port=port, charset='utf8')

AttributeError: 'module' object has no attribute 'connect'
      args = ("'module' object has no attribute 'connect'",)

This looks at first sight like an API change, but it this MySQLdb were suddenly equall to None, you'd get the same exception. Can't guess without the .py file (or the version of Trac).

It should be noted that the cause for all this trouble is still a mystery.
None of the site code (or the .htaccess file) has been touched for many
months, and certainly nothing was done last weekend.  At least one other
site hosted by the same provider also went down at the same time, so it
could be collateral damage as a result of a system-level change they made. 
In any case, this is what we have to work with and it would be great to fix
the problem sooner rather than later.
Then this could be a change in a library it depends on. This is a global install, the libraries are shared with the whole system. Current Python practices tend to avoid that.