[wxPython-users] ANN: GUI2Exe for wxPython :-D
roee shlomo
roee88 at gmail.com
Sun Apr 1 15:54:26 PDT 2007
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.
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 =3D wx.StandardPaths.Get()
> configDir =3D opj(standardPath.GetUserConfigDir() + "/.GUI2Exe")
> configDb =3D 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 =3D self.callable(*self.args, **self.kwargs)
> > File "C:\Download\GUI2Exe_source\GUI2Exe.py", line 1183,
> > in ShowMain
> > frame =3D GUI2Exe(None, -1, "", size=3D(xvideo, yvideo))
> > File "C:\Download\GUI2Exe_source\GUI2Exe.py", line 106,
> > in __init__
> > self.dataBase =3D DataBase(self, dbName)
> > File "C:\Download\GUI2Exe_source\DataBase.py", line 31,
> > in __init__
> > self.db =3D 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200704=
02/c9e62c70/attachment.htm
More information about the wxpython-users
mailing list