|
webdezzi (m)
|
i've been trying to figure out where the problem lies with no clue yet. i am getting ImportError: DLL load failed: the specified procedure could not be found. i smell the problem is from py2exe and this is what i have in the setup file from distutils.core import setup import py2exe
setup(windows=[{"script":"npmcnp.py","icon_resources":[(1,"npmcn.ico")]}], options={"py2exe":{"includes":["sip","PyQt4._qt"],'bundle_files': 1}}) i have tried options 2 and 3 also for the bundle_files parameter with no luck. the DLL it failed to load is psycopg2, psycopg2 is one of the modules needed to run the application
|
|
|
|
|
|
pc guru (m)
|
Guy i respect you.You already coding in Qt.Would love to learn that.Join thier forum and ask for help.Qt is the future
|
|
|
|
|
|
pc guru (m)
|
Guy i respect you.You already coding in Qt.Would love to learn that.Join thier forum and ask for help.Qt is the future
|
|
|
|
|
|
jacob05 (m)
|
Had TheSame problem
|
|
|
|
|
|
*dhtml (m)
|
Ehm, permission to shoot my maut hia. . . .while i dont know python or what the heck Qt means! I have some experience with creating and loading DLLs both in C++, Visual Basic, PHP and even loading it on msdos commandline sef.
One thing i have come to realize is that there are many ways of loading DLLs into applications. I am aware of static linkage and dynamic linkage. So many platforms usually have more than one method of loading DLLs. For instance the dl function in php will fail if the DLL does not have an iDispatch interface. . . .so for that particular dll you are having issues with loading, go and lookup the documentation of your language and see how it is implemented. I will not be quick to believe that those DLLs are corrupt. Or better still, try to see if you can get a sample working code of the implementation of those DLLs from somewhere.
|
|
|
|
|
|
pc guru (m)
|
Dhtml guy why the absence from nairaland don't you know pple dey look up to ya.How you doing.
|
|
|
|
|
|
pc guru (m)
|
Dhtml guy why the absence from nairaland don't you know pple dey look up to ya.How you doing.
|
|
|
|
|
|
*dhtml (m)
|
I have been around, just had to reduce my posts 'cos i had loads of work to do. My desk is partially cleared for now.
|
|
|
|
|
|
*dhtml (m)
|
Please o, if anyone has found the solution, it will be nice to post it here so that we can all learn. By the way, i just created a php extension with microsoft c++ 6.0 i called it php_hello.dll and it just shows hello world, i am interested in discussing with anyone else knowlegeable in this area. But not on this thread please. DLLs are rather tough areas sometimes.
|
|
|
|
|
|
webdezzi (m)
|
I found it, the problem is from py2exe adding 2 extra dlls from my Vista, the target machines are 2000/xp/vista so things works fine on vista while 2000/xp complains of not seeing psycopg2\_psycopg.pyc even though it's there
here is the error,
>> Traceback (most recent call last): >> File "npmcn.py", line 2, in <module> >> File "psycopg2\__init__.pyc", line 60, in <module> >> File "psycopg2\_psycopg.pyc", line 12, in <module> >> File "psycopg2\_psycopg.pyc", line 10, in __load >> ImportError: DLL load failed: The specified procedure could not be found.
i just figured Vista keeps shipping something with my app thats not needed or not compatible with other windows version excluding 2 dlls from the zip did the trick
so 2000/xp kept using the vista version instead of using the native one located in the windows' system32 folder the too naughty dlls are Secur32.dll and SHFOLDER.dll
i also figured out that py2exe has a way you can exclude dlls "dll_excludes": ["whatever.dll"] you will need to add it to the options' argument like below
excludes = ["Secur32.dll", "SHFOLDER.dll"] setup( options = {"py2exe": {"includes":["sip","PyQt4._qt"], "compressed": 1, "optimize": 2, "ascii": 1, "bundle_files": 1, "dll_excludes": excludes }}, zipfile = None, windows = [test_wx], )
this gave me headache for almost a month, how i wish someone has experienced and posted something like this.
|
|
|
|
|
|
*dhtml (m)
|
well, i guess someone has to lead the way
|
|
|
|
|
|