| OperationalError | Python 2.4.3: /usr/bin/python Wed Nov 25 03:07:38 2009 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /home/groups/c/co/coverhunter/cgi-bin/index.cgi |
| 34 section = form.getvalue("section", "overview") |
| 35 print build_header(section) |
| 36 print build_body(section) |
| 37 print build_footer() |
| 38 |
| build_body = <function build_body>, section = 'news' |
| /home/groups/c/co/coverhunter/cgi-bin/builder.py in build_body(section='news') |
| 171 build_func = functions[section] |
| 172 body = body + '<div id="main">' |
| 173 body = body + build_func() |
| 174 body = body + '</div>' # close the "main" div |
| 175 body = body + '</div>' # close the "body" div |
| body = '<div id="body"><div id="lefthand">\n ...edits</a></span><br /></div></div><div id="main">', build_func = <function build_news> |
| /home/groups/c/co/coverhunter/cgi-bin/builder.py in build_news() |
| 74 def build_news(): |
| 75 import MySQLdb |
| 76 db = MySQLdb.connect(db=dbname, host=host, user=user, passwd=passwd) |
| 77 cursor = db.cursor() |
| 78 cursor.execute("SELECT title, date, body FROM news ORDER BY date DESC") |
| db undefined, MySQLdb = <module 'MySQLdb' from '/usr/lib64/python2.4/site-packages/MySQLdb/__init__.pyc'>, MySQLdb.connect = <function Connect>, global dbname = 'coverhunter', global host = 'mysql', global user = 'coverhunter', global passwd = 'gui1979' |
| /usr/lib64/python2.4/site-packages/MySQLdb/__init__.py in Connect(*args=(), **kwargs={'db': 'coverhunter', 'host': 'mysql', 'passwd': 'gui1979', 'user': 'coverhunter'}) |
| 72 """Factory function for connections.Connection.""" |
| 73 from connections import Connection |
| 74 return Connection(*args, **kwargs) |
| 75 |
| 76 connect = Connection = Connect |
| Connection = <class 'MySQLdb.connections.Connection'>, args = (), kwargs = {'db': 'coverhunter', 'host': 'mysql', 'passwd': 'gui1979', 'user': 'coverhunter'} |
| /usr/lib64/python2.4/site-packages/MySQLdb/connections.py in __init__(self=<_mysql.connection closed at 106d13f0>, *args=(), **kwargs={'db': 'coverhunter', 'host': 'mysql', 'passwd': 'gui1979', 'user': 'coverhunter'}) |
| 167 kwargs2['client_flag'] = client_flag |
| 168 |
| 169 super(Connection, self).__init__(*args, **kwargs2) |
| 170 |
| 171 self.encoders = dict([ (k, v) for k, v in conv.items() |
| builtin super = <type 'super'>, global Connection = <class 'MySQLdb.connections.Connection'>, self = <_mysql.connection closed at 106d13f0>, ).__init__ = <bound method Connection.__init__ of <_mysql.connection closed at 106d13f0>>, args = (), kwargs2 = {'client_flag': 196608, 'conv': {0: <class 'decimal.Decimal'>, 1: <type 'int'>, 2: <type 'int'>, 3: <type 'long'>, 4: <type 'float'>, 5: <type 'float'>, 7: <function mysql_timestamp_converter>, 8: <type 'long'>, 9: <type 'int'>, 10: <function Date_or_None>, ...}, 'db': 'coverhunter', 'host': 'mysql', 'passwd': 'gui1979', 'user': 'coverhunter'} |
OperationalError: (2005, "Unknown MySQL server host 'mysql' (1)")
args =
(2005, "Unknown MySQL server host 'mysql' (1)")