P4DTI issue job000336

TitleUnhelpful error message if MySQLdb not installed correctly
Assigned userNick Barnes
DescriptionIf MySQLdb is not installed correctly, or not installed at all, then the P4DTI produces a most unhelpful error messages, claiming not to support Bugzilla.
In particular, it produces the following error:
P4DTI Initialization error: (P4DTI-10004) The defect tracker 'Bugzilla' is not supported
AnalysisIn init.py we catch ImportErrors from importing the configuration module (configure_bugzilla.py, in this case), attempting to produce a useful error message. However, if the configuration module exists but attempts to import another module which can't be imported, this error message is misleading rather than useful.
We should either not catch the ImportError, or produce a more useful message.
Fixed on the migrate_bugzilla branch.
You can find out more detail about the cause of this error message by importing configure_bugzilla by hand from Python. If it's a MySQLdb problem, you get this:

$ python
Python 1.5.2 (#2, Jul 19 2000, 19:09:55) [GCC 2.95.2 19991024 (release)] on freebsd4
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import configure_bugzilla.py
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "configure_bugzilla.py", line 48, in ?
    import MySQLdb
ImportError: No module named MySQLdb

See also job000315, in which the same error message is generated but possibly from a different cause.
How foundcustomer
Evidence<URL: http://info.ravenbrook.com/mail/2001/06/20/13-25-57/0.txt>
Observed in1.1.1
Introduced in1.1.1
Created byNick Barnes
Created on2001-06-20 14:30:49
Last modified byGareth Rees
Last modified on2001-12-10 19:45:49
History2001-06-20 NB Created


Change Effect Date User Description
14136 closed 2001-07-14 22:22:02 Gareth Rees Removed try/except around imports; this was obscuring other import errors.