String or Unicode type required, wxPython StaticText
问题 I'm trying to make a wxPython static text widget. For some reason I keep getting the error below. Snippet: self.Label = wx.StaticText(self, pos=(sw/2.0 - w/2.0, sh/2.0 - h/2.0), label='hello') Error: ", line 238, in make_label self.Label = wx.StaticText(self, pos=(sw/2.0 - w/2.0, sh/2.0 - h/2.0), label='hello') File "C:\Python26\lib\site-packages\wx-2.8-msw-ansi\wx\_core.py", line 8500, in SetLabel return _core_.Window_SetLabel(*args, **kwargs) TypeError: String or Unicode type required 回答1: