Loading pyd fails with "The operating system cannot run %1"

wazza murraywk at gmail.com
Wed Aug 4 07:45:31 CEST 2010


On Aug 4, 1:39 pm, wazza <murra... at gmail.com> wrote:
> Running python 2.6 (r26:66714)  on Win Xp Pro SP3, I receive the
> following message:
> python -v -v -v>>> import functions
>
> .
> .
>
> # trying U:\wss\v72212\components\trm\python\lib\lib\site-packages
> \_fk_cl.pyd
> #   clear[2] __file__
> #   clear[2] __package__
> #   clear[2] __path__
> #   clear[2] __name__
> #   clear[2] __doc__
> #   clear[2] __name__
> #   clear[2] __file__
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "u:\wss\v72212\components\trm\python\lib\lib\site-packages
> \functions.py", line 1, in <module>
>     import FK.Core
>   File "U:\wss\v72212\components\trm\python\lib\lib\site-packages\FK
> \Core\__init__.py", line 19, in <module>
>     from _fk_cl import *
> ImportError: DLL load failed: The operating system cannot run %1.
>
> Tracking this back, this represents an error code in windows:
>
> ERROR_INVALID_ORDINAL
> 182 (0xB6)
>
> The web has been unhelpful on what this represents.
>
> This works for people on other computers with the same configuration.
> I have python 2.6 loaded locally.
>
> Any ideas? I thought perhaps file associations in windows, but there
> are none for .pyd files.

OK Fixed it myself (maybe I should have looked deeper ebfore raising
this post.

I used dependency walker to check the dependencies of the pyd file. It
indicated that
libeay.dll had a problem (at least one module has an unresolved improt
due to a missing export function
in an implicity dependent module.

Looked and sure enough it was in /windows/system32, dated 4/3/2008.
There were 5 other instances on the box, from things like
Yahoo widget engine, Landesk and vmware infrastructure server

libeay.dll is part of the ssl library and must mismatch with some
other parts of the application.

In time honored manner, deleted from /windows/system32 (did not bother
unregistering) and the problem is solved.



More information about the Python-list mailing list