对python相当陌生,正在寻求一些帮助使其符合我的意愿。我正在开发一个小应用程序,它将使用一个数据库来填充所有链接到各种liststore对象的各种组合框。我可以从MySQL中提取数据,但是在尝试将值插入到列表存储时,这些数据都会崩溃。我要么结束:
ValueError: row sequence has the incorrect number of elements
我的liststore对象是为单行gchararray配置的
我的代码如下:
^{pr2}$如果我插入:
dblist = [['1'], ['2'], ['3']]
就在之前
for i in range(len(dbslit)):
self.list_customers.append(list(dblist[i]))
它工作得很好。在
这将获得与
[['1'], ['2'], ['3']]
相同的格式:或者只是
^{pr2}$虽然你可以简单地
如果gtx接口不坚持列表。。在
相关问题 更多 >
编程相关推荐