Seite 1 von 1

nach dem ausführen der .exe fehler mit pango im log?

Verfasst: Freitag 16. Juni 2006, 17:39
von matrixnet
hi

ich habe ein winsetup.py erstellt damit ich den sourcecode kompilieren kann unter windows.

Code: Alles auswählen


from distutils.core import setup
import py2exe




setup(
    name='Cryptis',

    options = {"py2exe": {
                            "compressed": 0,
                            "optimize": 2,
                            "excludes": "",
                            "packages" : ["encodings","cjkcodecs"]
                        }},
    windows = [ 
        {
            
            "script": "main.py", 
            "icon_resources": [(1, "c6icon32.png")] 
        } 
    ],
      data_files=[("",["cryptic6.glade", "c6icon16.png", "c6icon32.png", "c6icon64.png", "c6icon128.png"])]


    
    )

nun bruacht mein source diese pakete zum ausführen der gesamten anwendung:
python-2.4.2.msi
Twisted_NoDocs-2.1.0.win32-py2.4.exe
gtk-win32-devel-2.8.8-rc2.exe?download
pysqlite-1.1.6.win32-py2.4.exe
pygtk-2.8.2-1.win32-py2.4.exe
pycrypto-2.0.1.win32-py2.4.zip

nun muss ich mein winsetup.py anpassen?

hier der error log:
ImportError: could not import pango
ImportError: could not import pango
Traceback (most recent call last):
File "main.py", line 21, in ?
File "firstRun.pyo", line 2, in ?
File "gtk\__init__.pyo", line 113, in ?
AttributeError: 'module' object has no attribute 'Font'
habe jede menge an .dll mindestens 20 stück nach dem kompilieren.
ist das normal?
Bild

Verfasst: Freitag 16. Juni 2006, 17:45
von murph
du bist dir sicher, dass der skript so funktioniert und alle module beim interpreter in dem stammverzeichnis (C:\python2x\lib\) liegen?
das ist mein erster gedanke...

Verfasst: Freitag 16. Juni 2006, 17:52
von matrixnet
also ich kann ja via python24 main.py ausführen!

ich wollte eben als .exe kompilieren.
wenn ich meine main.exe ausführe kommt das error log

damit man ohne die 6 pakete geht!

mein build.bat:
c:\programme\python24\python.exe -OO winsetup.py py2exe -p encodings

Verfasst: Freitag 16. Juni 2006, 19:36
von murph
also zuerst versändlich, aber danach nicht mehr:
damit man ohne die 6 pakete geht!
was soll das bedeuten?
wenn die pakete bei dir beim interpreter reininstalliert sind, sollte das gehen.
nur wenn die pakete bei main.py reininstalliert ist, sieht das anders aus.
dann geht das nur, wenn die pakete (fertig installiert) daliegen.

Verfasst: Samstag 17. Juni 2006, 09:36
von matrixnet
ich habe gemeint ihc muss die 6 pakte installieren damit mein main.py
ausführen kann.
und mit einer main.exe wäre ja das alles schon dabei.

wenn nicht jeder hat lust die 6 dinge zu installieren um main.py auszuführen

via main.exe ist es einfacher

Re: nach dem ausführen der .exe fehler mit pango im log?

Verfasst: Samstag 17. Juni 2006, 11:09
von Leonidas
matrixnet hat geschrieben:habe jede menge an .dll mindestens 20 stück nach dem kompilieren.
ist das normal?
Absolut: PyGTK schleppt einiges an DLLs mit, GTK+ selbst auch nochmal.

Guck dir mal die setup.py im Wiki unter [wiki]PyGTK[/wiki] an, dort ist eine includes-Zeile, die pango explizit inkludiert.

Verfasst: Samstag 17. Juni 2006, 17:58
von Mad-Marty
Warum nutzt du kein py2exe ?

Das bundled dir alles zusammen in 1 datei bzw. mehrere.

Dann muss niemand irgendetwas installiert haben

Verfasst: Samstag 17. Juni 2006, 18:54
von Leonidas
Mad-Marty hat geschrieben:Warum nutzt du kein py2exe ?
Tut er doch, siehe oben im Thread.

Verfasst: Sonntag 18. Juni 2006, 18:47
von matrixnet
also hier mein abeändertes winsetup.py

Code: Alles auswählen

from distutils.core import setup
import py2exe




setup(
    name='Cryptic',

    options = {"py2exe": {
                            "compressed": 0,
                            "optimize": 2,
                            "includes": 'pango,atk,gobject',
                            "dll_excludes": [

        "libgtk-win32-2.0-0.dll","libpango-1.0-0.dll",
        "libpangowin32-1.0-0.dll","libgdk_pixbuf-2.0-0.dll","libpng13.dll",],
                            "packages" : ["encodings","cjkcodecs"]
                        }},
    windows = [ 
        {
            
            "script": "Cryptic6.py", 
            "icon_resources": [(1, "c6icon.ico")] 
        } 
    ],
      data_files=[("",["cryptic6.glade", "c6icon16.png", "c6icon32.png", "c6icon64.png", "c6icon128.png"])]


    
    )
also kann mein main.exe ohne probleme ausführen nun hab ich es auf einem anderen rechner es getestet es geht nicht!

Verfasst: Sonntag 18. Juni 2006, 18:57
von matrixnet
ich ahbs nochmal geändert:

Code: Alles auswählen

from distutils.core import setup
import py2exe




setup(
    name='Cryptic',

    options = {"py2exe": {
                            "compressed": 0,
                            "optimize": 2,
                            "includes": 'pango,atk,gobject',
                            "dll_excludes": [

               'iconv.dll', 'intl.dll', 'libatk-1.0-0.dll',
               'libgdk_pixbuf-2.0-0.dll', 'libgdk-win32-2.0-0.dll',
               'libglib-2.0-0.dll', 'libgmodule-2.0-0.dll',
               'libgobject-2.0-0.dll', 'libgthread-2.0-0.dll',
               'libgtk-win32-2.0-0.dll', 'libpango-1.0-0.dll',
               'libpangowin32-1.0-0.dll'],
                            "packages" : ["encodings","cjkcodecs"]
                        }},
    windows = [ 
        {
            
            "script": "Cryptic6.py", 
            "icon_resources": [(1, "c6icon.ico")] 
        } 
    ],
      data_files=[("",["cryptic6.glade", "c6icon16.png", "c6icon32.png", "c6icon64.png", "c6icon128.png"])]


    
    )
wenn ich die main.exe auf anderem rechner laufen lasse kommt der fehler das libglib-2.0-0.dll nicht gefunden wurde.
wenn ich den da rein kopiere dann sagt es fehlt eben ein anderes .dll. usw.

Verfasst: Sonntag 18. Juni 2006, 19:15
von murph
und was, wenn du 'iconv.dll', 'intl.dll', 'libatk-1.0-0.dll',
'libgdk_pixbuf-2.0-0.dll', 'libgdk-win32-2.0-0.dll',
'libglib-2.0-0.dll', 'libgmodule-2.0-0.dll',
'libgobject-2.0-0.dll', 'libgthread-2.0-0.dll',
'libgtk-win32-2.0-0.dll', 'libpango-1.0-0.dll',
'libpangowin32-1.0-0.dll'
mitlieferst? sprich alle, die du da aufgezählt hast?

Verfasst: Sonntag 18. Juni 2006, 19:25
von matrixnet
das habe ich auch schon probiert.
dann sehe ich im taskmanager das es läuft aber nichts vom gui sehen.

Verfasst: Sonntag 18. Juni 2006, 20:16
von Leonidas
und wenn du in deine ursprüngliche winsetup.py eifach nur die

Code: Alles auswählen

"includes": 'pango,atk,gobject',
Zeile übernimmst?

Verfasst: Montag 19. Juni 2006, 17:31
von matrixnet
so nun habe das mit dieser winsetup.py die .exe erstelt

Code: Alles auswählen

from distutils.core import setup
import py2exe




setup(
    name='Cryptic',

    options = {"py2exe": {

                            "includes": 'pango,atk,gobject',
                           
                        }},
    windows = [ 
        {
            
            "script": "Cryptic6.py", 
            "icon_resources": [(1, "c6icon.ico")] 
        } 
    ],
      data_files=[("",["cryptic6.glade", "c6icon16.png", "c6icon32.png", "c6icon64.png", "c6icon128.png"])]


    
    )
das gleiche problem es taucht im taskmanager auf aber vom gui ist nicht zu sehen!
man muss kein gtk installieren aufm anderem system?


Bild

Verfasst: Montag 19. Juni 2006, 18:14
von Leonidas
Noch eine andere Idee: Nimm die setup.py aus dem Wiki und installier auf den Zielsystemen die GTK Runtime direkt. Das ist das einfachste.

Verfasst: Montag 19. Juni 2006, 22:29
von matrixnet
als ich habe ein 3 winsetup.py erstellt also

Code: Alles auswählen

# setup.py
from distutils.core import setup
import py2exe
import glob

opts = {
    "py2exe": {
        "includes": "pango,atk,gobject",
        "dll_excludes": [
        "iconv.dll","intl.dll","libatk-1.0-0.dll",
        "libgdk_pixbuf-2.0-0.dll","libgdk-win32-2.0-0.dll",
        "libglib-2.0-0.dll","libgmodule-2.0-0.dll",
        "libgobject-2.0-0.dll","libgthread-2.0-0.dll",
        "libgtk-win32-2.0-0.dll","libpango-1.0-0.dll",
        "libpangowin32-1.0-0.dll"],
        }
    }

setup(
    name = "Cryptic6",
    description = "A nice GUI interface for those with GiantDisc jukebox systems.",
    version = "0.0.3",
    windows = [
        {"script": "cryptic6.py",
        "icon_resources": [(1, "c6icon.ico")]
        }
    ],
    options=opts,
    data_files=[("cryptic6.glade"),
    ],
)
http://www.anti-particle.com/old/py2exe-0.5.shtml

übernommen und etwas ageändert:
und aufm anderen system ist gtk runtime schon installiert bevor ich dsa problem hatte.

oder es muss jemand anders probieren obs bei ihm läuft.
es geht vielleciht nur bei mir nicht

Verfasst: Montag 19. Juni 2006, 22:46
von Joghurt
Ähm... Du sagt py2exe, dass er manche DLLs nicht mitpacken soll (der dll_excludes-Teil) und wunderst dich dann, dass die DLLs nicht dabei sind?

Lass doch einfach den dll_excludes-Teil weg, So sollte es aussehen:

Code: Alles auswählen

opts = {
    "py2exe": {
        "includes": "pango,atk,gobject",
        }
    }

Verfasst: Dienstag 20. Juni 2006, 12:46
von matrixnet
wenn ich die dlls ganz weg mache dann geht nicht mal aufm pc1 system
E:\cryptic6-0.0.3\Cryptic-0.0.3-src\dist\cryptic6.exe:71: GtkWarning: Cannot open pixbuf loader module file 'E:\cryptic6-0.0.3\Cryptic-0.0.3-src\dist\etc\gtk-2.0\gdk-pixbuf.loaders': No such file or directory
E:\cryptic6-0.0.3\Cryptic-0.0.3-src\dist\cryptic6.exe:71: PangoWarning: No builtin or dynamically loaded modules
were found. Pango will not work correctly. This probably means
there was an error in the creation of:
'E:\cryptic6-0.0.3\Cryptic-0.0.3-src\dist\etc\pango\pango.modules'
You may be able to recreate this file by running pango-querymodules.
E:\cryptic6-0.0.3\Cryptic-0.0.3-src\dist\cryptic6.exe:71: PangoWarning: _pango_engine_shape_shape: assertion `PANGO_IS_FONT (font)' failed

Code: Alles auswählen

# setup.py
from distutils.core import setup
import py2exe
import glob

opts = {
    "py2exe": {
        "includes": "pango,atk,gobject",
        
        }
    }

setup(
    name = "Cryptic6",
    description = "A nice GUI interface for those with GiantDisc jukebox systems.",
    version = "0.0.3",
    windows = [
        {"script": "cryptic6.py",
        "icon_resources": [(1, "c6icon.ico")]
        }
    ],
    options=opts,
    data_files=[("cryptic6.glade"),
    ],
)
keine ahnung wie ich das problem lösen kann?
mit den dll_excludes" lief es aufm pc1 system ohne probs aber nciht aufm anderen pc.

Verfasst: Dienstag 20. Juni 2006, 13:11
von DatenMetzgerX
Auf dem PC wo du das programm entwickelst muss es laufen (ausser wenn du fehler beim coden machst). Denn du hast auf diesem PC ALLE DLLS

Mach doch mald as was er gesagt hat...

Verfasst: Mittwoch 21. Juni 2006, 10:59
von matrixnet
Bild

es geht also nun gar nicht mehr.