[size=x-large]
centos5
python2.5.2
mysql-python1.2.2
执行到最后一句时,抛出异常了:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/cursors.py", line 166, in execute
self.errorhandler(self, exc, value)
File "MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
SystemError: NULL object passed to Py_BuildValue
找了一天,发现这方面的资料几乎没有,不知道有人碰到过这样的情况没?[/size]
centos5
python2.5.2
mysql-python1.2.2
import MySQLdb
import sys
db=MySQLdb.connect(user="##",passwd="##",db="##",host="######",port=3306)
cur=db.cursor(MySQLdb.cursors.Cursor)
sql="show tables"
cur.execute(sql)
执行到最后一句时,抛出异常了:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/cursors.py", line 166, in execute
self.errorhandler(self, exc, value)
File "MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
SystemError: NULL object passed to Py_BuildValue
找了一天,发现这方面的资料几乎没有,不知道有人碰到过这样的情况没?[/size]