`
baitian
  • 浏览: 29662 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

mysql-python 异常

阅读更多
[size=x-large]
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]
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics