Seite 1 von 1

Problem mit py2exe

Verfasst: Donnerstag 13. November 2003, 08:36
von HarryH
Hallo

Ich habe ein Problem mit py2exe.
Vorher noch einige Daten.
OS = Windows 2000
Python-Version = Python 2.3
py2exe-Version = 0.4.2. für Python 2.3

In Verbindung mit dem Modul shelve treten Probleme auf.
Starte ich mein Programm über die Python.exe funktioniert alles einwandfrei ohne jegliche Fehlermeldung.

Bei der Konvertierung mit py2exe tritt bereits folgender Fehler auf:
----
warning: py2exe: ********************************************
warning: py2exe: * The following modules were not found:
warning: py2exe: * Carbon.Folder
warning: py2exe: * Carbon.Folders
warning: py2exe: * clip_dndc
warning: py2exe: * cmndlgsc
warning: py2exe: * controls2c
warning: py2exe: * controlsc
warning: py2exe: * dbm
warning: py2exe: * eventsc
warning: py2exe: * fcntl
warning: py2exe: * filesysc
warning: py2exe: * fontsc
warning: py2exe: * framesc
warning: py2exe: * gdic
warning: py2exe: * imagec
warning: py2exe: * mdic
warning: py2exe: * misc2c
warning: py2exe: * miscc
warning: py2exe: * mx
warning: py2exe: * printfwc
warning: py2exe: * readline
warning: py2exe: * sizersc
warning: py2exe: * stattoolc
warning: py2exe: * streamsc
warning: py2exe: * utilsc
warning: py2exe: * windows2c
warning: py2exe: * windows3c
warning: py2exe: * windowsc
warning: py2exe: ********************************************
----

Kommt es dann bei Laufzeit des konvertierten Programms zur Verwendung von "shelve", erscheint folgender Fehler (der Fehler erscheint nicht beim import von shelve sondern erst bei dessen Verwendung):
----
Traceback (most recent call last):
File "C:\Programme\Tebis_AG\CadTool\Anwendung\stundenrechner.pyc", line 236, i
n OnOk

File "shelve.pyc", line 231, in open
File "shelve.pyc", line 211, in __init__
File "imputil.pyc", line 103, in _import_hook
File "<string>", line 52, in _import_top_module
File "imputil.pyc", line 216, in import_top
File "imputil.pyc", line 271, in _import_one
File "<string>", line 128, in _process_result
File "anydbm.pyc", line 62, in ?
ImportError: no dbm clone found; tried ['dbhash', 'gdbm', 'dbm', 'dumbdbm']
----

Was kann ich tun das mein Programm auch als "exe" läuft? Könnt ihr mir bitte helfen?

Vielen Dank schon im Voraus!

Verfasst: Donnerstag 13. November 2003, 13:20
von Leonidas
Kann es sein das du die pyd's nicht mitgeliefert hast?

re:

Verfasst: Donnerstag 13. November 2003, 13:23
von HarryH
Hi

Was meinst du mit pyd's ? :?:

Re: Problem mit py2exe

Verfasst: Donnerstag 13. November 2003, 15:43
von Voges
Hallo!
HarryH hat geschrieben: File "anydbm.pyc", line 62, in ?
ImportError: no dbm clone found; tried ['dbhash', 'gdbm', 'dbm', 'dumbdbm']
Importierte mal zusätzlich zu shelve noch dbhash. Letztes ist eine Alternative zu dbm, die aber py2exe von sich aus nicht zu erkennen scheint. dbm gibt es AFAIK nur unter UNIX.
Jan

Verfasst: Donnerstag 13. November 2003, 16:06
von Leonidas
Normalerweise wird doch bsddb benutzt, oder? bsddb gibts unter posix und win32.

re:

Verfasst: Donnerstag 13. November 2003, 16:11
von HarryH
Hallo,

Schon mal danke für eure Bemerkungen! Ich konnte das Problem bereits lösen. Ich habe folgendes gemacht:

Zeile 463 in der Datei "build_exe.py" des Verzeichnisses von py2exe:

Code: Alles auswählen

##            "anydbm": ['dbhash', 'gdbm', 'dbm', 'dumbdbm'],
durch folgende Zeile ersetzt:

Code: Alles auswählen

"anydbm": ['dbhash', 'dumbdbm'],
Jetzt gehts einwandfrei.
Hat wahrscheinlich eine ähnliche Wirkung wie der Vorschlag von Jan.