[wxPython-users] ANN: GUI2Exe for wxPython :-D

Andrea Gavana andrea.gavana at gmail.com
Sun Apr 1 16:06:51 PDT 2007


Hi Roee,

On 4/2/07, roee shlomo wrote:
> It did create the .GUI2Exe directory in my %appdata% folder.
> my guess is that it looks after an encoded path and that is why it can't
> find it.
> I have tried to replace opj with os.path.join and even to replace
> standardPath.GetUserConfigDir() with a more simple path like C: , no luck so
> far.

Thank you for the beta testing :-D :-D . Actually, if you write something like:

print configDir, configDb

in CheckForDatabase, do you receive meaningful path or something that
doesn't even exist? This one really puzzles me. I work on an PC with
italian configuration and another one with english (UK) one, and both
started without a flaw, both the executable and the source code.
Either I did something really stupid in the code or I don't know how
to deal correctly with bsddb...

Thank you again for your bug report, altough I don't know what to do
about it at the moment as on my machines all went well :-( . Is
anybody else seeing this problem (a part from Roee and Jesus
Martinez)?

:-( :-( :-(


> On 4/2/07, Andrea Gavana <andrea.gavana at gmail.com > wrote:
> >
> > Hi Roee,
> >
> > On 4/1/07, roee shlomo wrote:
> > > The windows binary gives:
> > > Traceback (most recent call last):
> > >   File "wx\_misc.pyo", line 1341, in Notify
> > >   File "wx\_core.pyo", line 14189, in Notify
> > >   File "GUI2Exe.py", line 1183, in ShowMain
> > >   File " GUI2Exe.py", line 106, in __init__
> > >   File "DataBase.pyo", line 31, in __init__
> > >   File "bsddb\__init__.pyo", line 323, in btopen
> > > bsddb.db.DBNoSuchFileError: (2, 'No such file or directory')
> >
> > It looks like on PCs other than the 2 I tried Python doesn'like these
> > lines of code:
> >
> >    def CheckForDatabase(self):
> >        """ Checks if a database exists. If it doesn't, creates one anew.
> """
> >
> >        # We build the database inside the user config folder, where we
> >        # also create a sub-directory called /.GUI2Exe
> >        standardPath = wx.StandardPaths.Get()
> >        configDir = opj(standardPath.GetUserConfigDir() + "/.GUI2Exe")
> >        configDb = opj(configDir + "/GUI2Exe_Database.db")
> >
> >        if not os.path.isfile(configDb):
> >            # No database
> >            if not os.path.isdir(configDir):
> >                # And no directory. Create a new one.
> >                os.mkdir(configDir)
> >
> >        return configDb
> >
> > So, it doesn't create the directory and bsddb is right in
> > complaining... I don't really know why, I was just trying to create a
> > directory called  /.GUI2Exe under the user configuration directory
> > which for me is:
> >
> > C:\Documents and Settings\Andrea\Dati applicazioni
> >
> > Curiously enough, it works well here :-( :-(
> >
> > BTW, I noticed I forgot to include the manifest file for Windows
> > (!!!!!), so the executable didn't look that much XP-style :-( . I
> > re-uploaded another version right now. However, I still don't know the
> > reason why the program can't create that particular directory. Maybe
> > someone more knowledgeable than me can explain it.
> >
> > > Running from source gave me an error saying setuptools is missing (I saw
> the
> > > comment on the source code. Why would anyone have py2app installed on
> > > windows?),
> >
> > I tried to install il to see if could be acutally __import__ed,
> > because, for example, on Windows cx_freeze and PyInstaller can not be
> > imported, do not live under site-packages and so on... cx_Freeze is an
> > executable on Windows!!!
> >
> > > so I installed setuptools anyway and I got this error:
> > > Traceback (most recent call last):
> > >   File
> > >
> "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py",
> > > line 1341
> > > , in Notify
> > >     self.notify()
> > >   File
> > >
> "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py
> > > ", line 1418
> > > 9, in Notify
> > >     self.result = self.callable(*self.args, **self.kwargs)
> > >   File "C:\Download\GUI2Exe_source\GUI2Exe.py", line
> 1183,
> > > in ShowMain
> > >     frame = GUI2Exe(None, -1, "", size=(xvideo, yvideo))
> > >   File "C:\Download\GUI2Exe_source\GUI2Exe.py", line
> 106,
> > > in __init__
> > >     self.dataBase = DataBase(self, dbName)
> > >   File "C:\Download\GUI2Exe_source\DataBase.py", line
> 31,
> > > in __init__
> > >     self.db = bsddb.btopen(dbName, "c")
> > >   File "C:\Python25\lib\bsddb\__init__.py", line 323,
> in
> > > btopen
> > >     d.open(file, db.DB_BTREE, flags, mode)
> > > UnicodeEncodeError: 'ascii' codec can't encode characters in position
> 26-29:
> > > ord
> > > inal not in range(128)
> > >
> > > My default system encoding is hebrew, must be something in bsddb's
> unicode
> > > support.
> >
> > I have no idea about that... surely Robin knows the answer, he has
> > developed bsddb for quite long time... but maybe is just my fault, I
> > never worked with bsddb before :-D
> >
> > Andrea.
> >
> > "Imagination Is The Only Weapon In The War Against Reality."
> > http://xoomer.virgilio.it/infinity77/
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> wxPython-users-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail:
> wxPython-users-help at lists.wxwidgets.org
> >
> >
>
>
>
> --
> http://code.google.com/p/lh-abc


-- 
Andrea.

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




More information about the wxpython-users mailing list