pymssql不能执行无条件的sql语句?

pymssql不能执行无条件的sql语句?

#!/usr/bin/env python
#coding=cp936
import pymssql
#查询操作
conn = pymssql.connect(host='192.168.40.153:1433',user='sa',password='123456',database='kub5test7')
cur = conn.cursor()
#SELECT 查询操作(无条件,逐条方式获取数据)
query = "select * from tb_log_av"
cur.execute(query)
for i in range(cur.rowcount):
    print cur.fetchone()
报错
Traceback (most recent call last):
  File "D:\test\python\testmssql.py", line 17, in <module>
    cur.execute(query)
  File "D:\Program Files\Python25\lib\site-packages\pymssql.py", line 183, in execute
    self._source.execute_query(operation, params)
TypeError: not all arguments converted during string formatting





但是如果我的sql语句有条件就正常运行
#SELECT 查询操作(带条件)
sql = 'select * from tb_log_kof where log_id=%d'
cur.execute(sql, 29)
for d in cur.fetchall():
    print r"%s" % d[0],d[1],d[2],d[3]


这是怎么回事呀
python2.5
pymssql1.0.0
兄弟姐妹们,来帮帮忙看看
cur.execute(sql, 29)这个是啥意思?
只是个条件而已,也可以写成
cur.execute(sql, (29,))
无参数是不是要写成 cur.execute(query,())?试下看

刚刚试出来,就是cur.execute(query,()),也非常感谢luffy.deng
因为api里execute(operation[,parameters]) 这个意思明明是可以不写的,而且看到好多人的例子程序里也是不写后面参数的
搞好好长时间
Help on method execute in module pymssql:

execute(self, operation, params=None) method of pymssql.pymssqlCursor instance
    Prepare and execute a database operation (query or command).
    Parameters may be provided as sequence or mapping and will be
    bound to variables in the operation. Parameter style for pymssql
    is %-formatting, as in:
    cur.execute('select * from table where id=%d', id)
    cur.execute('select * from table where strname=%s', name)
    Please consult online documentation for more examples and
    guidelines.

比较猥琐