Home Help Center

DLL Error while executing the Printer demo (python) in a fresh Windows install

msorenssonmsorensson Member Markus SorenssonOrganization: MSTECHProject: ice testing
Hi,

I am trying to create an executble of the python Printer demo in the ICE manual. I did it with py2exe. Everything works ok in my computer, but then, when I try it with a fresh Windows XP install, I am getting this error:
c:\test\server\Server.exe
Traceback (most recent call last):
   File "Server.py", line 11, in (module)
   File "Ice.pyc", line 33, in (module)
   File "IcePy.pyc", line 12, in (module)
   File "IcePy.pyc", line 10, in __load
ImportError: DLL load failed:...

I am including everything py2exe generates, the ICE DLLs and installed the Visual C++ 8.0 run time (vcredist_x86.exe) and I don´t think the problem is with py2exe, since I have tried with a simple "hello world" app and it worked.

Any ideas? Thanks!

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Welcome to the forum.

    We haven't tried using py2exe with Ice for Python, so we cannot guarantee that it will work. However, I expect it should work, as long as py2exe supports applications that load extensions via DLLs. Can you provide a list of the Ice DLLs that you bundled with your application?

    Take care,
    Mark
  • msorenssonmsorensson Member Markus SorenssonOrganization: MSTECHProject: ice testing
    Hi,

    I have to copy ice33.dll, iceutil33.dll, bzip2.dll and slice33.dll to the directory that py2exe creates in order for the Server and Client to work. But when I copy the same directory with all the stuff to the fresh XP install the program doesn´t work (of course I´ve installed previously the C++ Runtime). And I just tested by brute force copying everything included in the ICE´s bin directory and still not working.

    Have you guys tried to create and executable for python/ICE files? What did you use?

    Thanks for your help,

    Markus
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    I suspect that you're missing IcePy.dll, which is located in the python subdirectory of your Ice installation. I don't know where an executable created by py2exe looks for Python extensions, but IcePy.dll must be present. I suggest copying it into the same directory as the other Ice DLLs.

    Hope that helps,
    Mark
  • msorenssonmsorensson Member Markus SorenssonOrganization: MSTECHProject: ice testing
    Hi,

    It is using the IcePy.pyd file, not the DLL (I don´t have it in the machine where the program is actually working). That seems to be the file with the problem.

    It still keep getting this error:
    ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
    

    Thanks again.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    Sorry, when I wrote IcePy.dll I should have written IcePy.pyd.

    I think your problem is that you've installed the wrong Visual C++ 2005 redistributable package. Ice for Python 3.3.0 requires Visual C++ 2005 SP1, and you can download the SP1 redistributable package here.

    Let us know if that solves your problem.

    Take care,
    Mark
  • msorenssonmsorensson Member Markus SorenssonOrganization: MSTECHProject: ice testing
    Thanks! It worked. :)

    I would like to avoid having to install this since I want to create an installation for my future ICE based software. Could you tell me what DLLs is ICE using from this redistributable package so I only have to copy them?
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    I'm glad to hear it's working for you now.

    Ice requires the msvcr80.dll and msvcp80.dll files, which are installed in the directory \WINDOWS\WinSxS\x86_Microsoft.VC80.CRT....

    Regards,
    Mark
Sign In or Register to comment.