python错误绑定参数0可能不支持typ

2024-04-24 23:44:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用2.6版本的XBMC媒体应用程序编写python脚本。在

我的python脚本有一个问题,我得到一个错误:error Contents:error binding parameter 0-可能是不支持的类型。在

错误跳到这一行:

cur.execute('SELECT * FROM programs WHERE channel=? AND start_date <= ? AND stop_date >= ?', [channel, now, now])

代码如下:

^{pr2}$

以下是xbmc日志:

- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'sqlite3.InterfaceError'>
Error Contents: Error binding parameter 0 - probably unsupported type.
Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\XBMC\addons\script.tvguide\test.py", line 1682, in onAction
cur.execute('SELECT * FROM programs WHERE channel=? AND start_date <= ? AND stop_date >= ?', [channel, now, now])
InterfaceError: Error binding parameter 0 - probably unsupported type.
-->End of Python script error report<--

Tags: and脚本executedateparameter错误contentschannel