[wxPython-dev] Using AUI in the demo

Andrea Gavana andrea.gavana at gmail.com
Wed May 9 13:59:42 PDT 2007


Hi Roee,

> Traceback (most recent call last):
>   File "C:\Program Files\wxPython2.8 Docs and Demos\demo\Main.py", line
> 2067, in
>  OnClose
>     self.ShowMain()
>   File "C:\Program Files\wxPython2.8 Docs and Demos\demo\Main.py", line
> 2071, in
>  ShowMain
>     frame = wxPythonDemo(None, "wxPython: (A Demonstration)")
>   File "C:\Program Files\wxPython2.8 Docs and Demos\demo\Main.py", line
> 1221, in
>  __init__
>     self.ReadConfigurationFile()
>   File "C:\Program Files\wxPython2.8 Docs and Demos\demo\Main.py", line
> 1358, in
>  ReadConfigurationFile
>     self.expansionState = eval(fid.readline().strip().split(":")[1])
> IndexError: list index out of range

Uh?!? That's almost impossible... this is what the ReadConfigurationFile does:

        optionsFile = opj(wx.GetHomeDir() + "/.wxPyDemo/wxPythonOptions.txt")
        if not os.path.isfile(optionsFile):
            self.expansionState = [0, 1]
            return

        fid = open(optionsFile, "rt")
        self.expansionState = eval(fid.readline().strip().split(":")[1])

That means that you have a file named wxPythonOptions.txt in your home
directory but it is somewhat empty or bad written/formatted... or
maybe something else?!?!

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/




More information about the wxpython-dev mailing list