Hi,
I'm working on little phone book program with wxPython and SQLite. I can get database populated and can retrieve back the phones and names, but when I do fill them in ListCtrl it throws cruel errors :)
Here is the retrieved data from database:
[(1, u'Steve', u'Giddy', u'0654743553'), (2, u'Majia', u'Ukonovic', u'65473032'), (3, u'Joseph', u'Ryanc', u'7663991109')]
When I replace this with another list of tuples, everything loads fine, so I guess something is wrong with this result !
and here is the error it throws:
TypeError: String or Unicode type required
File "F:\My Projects\Python\PhoneBook.py\mainfile.pyw", line 117, in <module>
app.MainLoop()
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7967, in MainLoop
wx.PyApp.MainLoop(self)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7292, in MainLoop
return _core_.PyApp_MainLoop(*args, **kwargs)
File "F:\My Projects\Python\PhoneBook.py\mainfile.pyw", line 104, in OnAdd
self.OnPopulate(items)
File "F:\My Projects\Python\PhoneBook.py\mainfile.pyw", line 79, in OnPopulate
index = self.screen.InsertStringItem(sys.maxint, data[0])
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py", line 4761, in InsertStringItem
return _controls_.ListCtrl_InsertStringItem(*args, **kwargs)