用kivy保存列表

时间:2015-09-02 10:55:53

标签: python-2.7 kivy

我写了一个kivy应用程序,它应该保存一个字符串列表。 但是当我尝试将新的String追加到列表中时,我得到了这个错误:

ValueError: dictionary update sequence element #0 has length 1; 2 is required

这是函数,它应该生成并保存列表:

def save(self, vinput):
    store = JsonStore('hello.json')
    self.ueberschrift = ([])
    if store.exists('tito'):
        self.ueberschrift = store.get('tito')
    self.ueberschrift.update(vinput)
    store.put('tito', list_of_cap=self.ueberschrift)

我离开应用程序的其余部分并导出命令,因为这些部分工作正常。

0 个答案:

没有答案