473,785 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLL load failed: The specified procedure could not be found

sys.path:
H:\Husky\HostPC \V1\SHIP\Debug
H:\Husky\HostPC \V1\SHIP
E:\Bill\Python-2.4.1\PCbuild\p ython24_d.zip
C:\Python24\Lib
C:\Python24\DLL s
C:\Python24\Lib \lib-tk
H:\Husky\HostPC \V1\RunSHIP
H:\Husky\HostPC \V1\Debug
C:\Python24
C:\Python24\lib \site-packages

Traceback (most recent call last):
File "H:\Husky\HostP C\V1\SHIP\test1 .py", line 7, in ?
import SHIP
File "H:\Husky\HostP C\V1\Debug\SHIP .py", line 5, in ?
import _SHIP
ImportError: DLL load failed: The specified procedure could not be found.

a) What "specified procedure "
b) SHIP was made by SWIG
c) Is there some way to find out which DLL and which procedure is involved?

It's all debug build, sys.path has all the Debug directories.

tia
Bill
Jul 19 '05 #1
2 8594
Bill Davy wrote:
sys.path:
H:\Husky\HostPC \V1\SHIP\Debug
H:\Husky\HostPC \V1\SHIP
E:\Bill\Python-2.4.1\PCbuild\p ython24_d.zip
C:\Python24\Lib
C:\Python24\DLL s
C:\Python24\Lib \lib-tk
H:\Husky\HostPC \V1\RunSHIP
H:\Husky\HostPC \V1\Debug
C:\Python24
C:\Python24\lib \site-packages

Traceback (most recent call last):
File "H:\Husky\HostP C\V1\SHIP\test1 .py", line 7, in ?
import SHIP
File "H:\Husky\HostP C\V1\Debug\SHIP .py", line 5, in ?
import _SHIP
ImportError: DLL load failed: The specified procedure could not be found.

a) What "specified procedure "
b) SHIP was made by SWIG
and so presumably was _SHIP ... therefore it appears that you might be
better off asking for help on the SWIG mailing list.
c) Is there some way to find out which DLL and which procedure is involved?


One would expect given the reported context (import _SHIP) that it has
found (somewhere!) a DLL called "_SHIP.pyd" and is looking in it
(unsuccessfully ) for an entrypoint called "init_SHIP" .

The usual suspect here would be the C (or C++) compiler messing with the
name of the entrypoint; possible messes include underscores at the front
and/or frame size at the end e.g. "_initfoo@1 2" instead of just
"initfoo". Possibly you are using a C[++] compiler that's not the one
that SWIG thinks you are using.

But exactly which DLL? Given your "interestin g" sys.path, it might be an
idea to run python with the -v argument, so you can see where all your
imports are resolved.

Once you have worked out which _SHIP.pyd is the cause, you can inspect
it and determine what entrypoint(s) it has.

HTH,
John
Jul 19 '05 #2
"John Machin" <sj******@lexic on.net> wrote in message
news:42******** @news.eftel.com ...
a) What "specified procedure "
b) SHIP was made by SWIG
and so presumably was _SHIP ... therefore it appears that you might be
better off asking for help on the SWIG mailing list.


I will too.
c) Is there some way to find out which DLL and which procedure is
involved?
One would expect given the reported context (import _SHIP) that it has
found (somewhere!) a DLL called "_SHIP.pyd" and is looking in it
(unsuccessfully ) for an entrypoint called "init_SHIP" .

The usual suspect here would be the C (or C++) compiler messing with the
name of the entrypoint; possible messes include underscores at the front
and/or frame size at the end e.g. "_initfoo@1 2" instead of just "initfoo".
Possibly you are using a C[++] compiler that's not the one that SWIG
thinks you are using.

But exactly which DLL? Given your "interestin g" sys.path, it might be an
idea to run python with the -v argument, so you can see where all your
imports are resolved.


I've not been able to find where sys.path finds its components and would
happily sort them out. It does not seem to be PYTHONPATH or PATH or
PYTHON_LIB.

I had to make Python as I wanted a debug build for Win32 (and hence
E:\Bill\Python-2.4.1\PCbuild\p ython24_d.zip on sys.path though why the zip I
have no idea). I have discovered the symbol __debug__ is True for debug
builds.

Once you have worked out which _SHIP.pyd is the cause, you can inspect it
and determine what entrypoint(s) it has.

HTH,
John


Dear John (and all)

That's a great help, really. A simple thing like reminding me of -v (give a
man a fish, etc) will help now and hereafter.

So, now we can see what Python is trying to do:

Python 2.4.1 (#65, May 24 2005, 11:31:45) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright" , "credits" or "license" for more information.
# trying H:\Husky\HostPC \V1\SHIP\Debug\ SHIP_d.pyd
# trying H:\Husky\HostPC \V1\SHIP\Debug\ SHIP_d.dll
# trying H:\Husky\HostPC \V1\SHIP\Debug\ SHIP.py
# H:\Husky\HostPC \V1\SHIP\Debug\ SHIP.pyc matches
H:\Husky\HostPC \V1\SHIP\Debug\ SHIP.py
import SHIP # precompiled from H:\Husky\HostPC \V1\SHIP\Debug\ SHIP.pyc
# trying H:\Husky\HostPC \V1\SHIP\Debug\ _SHIP_d.pyd
# clear[2] __name__
# clear[2] __file__
Traceback (most recent call last):
File "H:\Husky\HostP C\V1\SHIP\test1 .py", line 15, in ?
import SHIP
File "H:\Husky\HostP C\V1\SHIP\Debug \SHIP.py", line 5, in ?
import _SHIP
ImportError: DLL load failed: The specified procedure could not be found.
# clear __builtin__._

It's still not clear what procedure could not be found (surely not
__file__?!). However, the output from "dumpbin /exports
H:\Husky\HostPC \V1\SHIP\Debug\ _SHIP_d.pyd" is:

H:\Husky\HostPC \V1\SHIP\Debug> dumpbin /exports
H:\Husky\HostPC \V1\SHIP\Debug\ _SHIP_d.pyd
Microsoft (R) COFF Binary File Dumper Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Dump of file H:\Husky\HostPC \V1\SHIP\Debug\ _SHIP_d.pyd

File Type: DLL

Section contains the following exports for SHIP.pyd

0 characteristics
429D76E4 time date stamp Wed Jun 01 09:50:44 2005
0.00 version
1 ordinal base
1 number of functions
1 number of names

ordinal hint RVA name

1 0 00001096 init_SHIP

Summary

6000 .data
2000 .idata
3000 .rdata
2000 .reloc
1000 .rsrc
20000 .text

So _SHIP_d.pyd does export init_SHIP.

The odd thing there (to me) is the reference to "SHIP.pyd". Is that coming
from SHIP.def which has:
LIBRARY "SHIP"

The thing that is really bugging me is that this was all working before the
weekend :-(

I am also posting this to the SWIG mailing list as suggested.

TIA

Bill
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1933
by: Ajay | last post by:
hi! I wrote a simple C code to work with OpenSSL and it builds fine. however when i import it, i get an error ImportError: DLL load failed. The specified module could not be found. the file is in Python/Lib directory. the code is below.
2
3296
by: Jeff_Mac | last post by:
Hi there. I'm a bit of a newbie, and I would appreciate any help that anyone can give me on an error I'm getting with Crystal Reports. Every time I attempt to view a report using the Crystal Report Viewer, I get a "Load Report Failed" error, and I'm not sure what I can do to resolve it. I know it's not the connection to the data -- I'm able to get a datagrid to display the data just fine after filling a dataset. I tried searching the...
0
1275
by: Vetril Group | last post by:
sir , myself priji kuriaksoe, i am facing one problem in deployement of crystalreports ? actually error shows like this report load failed , in my system this is properly working, i will create setup for deplyeemnt and using that setup i will install my software in my system that time it will working , i will try to install some other machine it will show error like that report load failed remaing all forms are working i try to install...
5
2156
by: bradtm | last post by:
I get the error: 'The specified procedure could not be found.' Anyone know why? I get the error to the call of the function MapViewOfFile(): Private Const FILE_MAP_ALL_ACCESS As Integer = &H1 Or &H2 Or &H4 Or &H8 Or &H10 Or &HF0000 Private Declare Auto Function MapViewOfFile Lib "kernel32" ( _ ByVal hFileMappingObject As IntPtr, _ ByVal dwDesiredAccess As Integer, _
5
11812
by: zhayle | last post by:
i'm new to python programming..and i'm studying into one of its tutorials..I used pygres for its interface to the postgresql database..the problem is when i tried to run "import _pg" it has an error like this: Traceback (most recent call last): File "<pyshell#0>", line 1, in -toplevel- import pg File "C:\Python24\Lib\site-packages\pg.py", line 21, in -toplevel- from _pg import * ImportError: DLL load failed: The specified...
0
1256
by: =?Utf-8?B?VmVua2F0ZXNo?= | last post by:
I am using ASP.NET 2.0. Whenever i open the Microsoft visula studio and open a new website, i am getting the package load editor failed,and everytime i have to use the devenv /ResetSkipPkgs to restore all... why is this happening all the time? Is there any permanent fix for this? please help
0
1030
by: Jwilliams | last post by:
I installed an application which adds an extended stored procedure. I've since uninstalled the application and deleted the xp it added, however when SQL Server 2000 starts the event 'Could not find stored procedure 'master..xp_TheApplication' is logged. How do I tell SQL Server not to load this xp, or otherwise clear out xp's which don't exist? thanks
0
1646
by: jasonlyt | last post by:
Can anyone advise me how to run Runstats and Load command in a stored procedure? Thanks.
0
2677
by: Andrew MacIntyre | last post by:
Tony May wrote: The DLL that's actually being imported by your script is not a Python extension module, as the modules initialisation function can't be found. Use the -v option on the Python command line to identify which DLL is actually being imported. You can then decide to move/rename.delete it or your own module as best fits your circumstances. --
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9489
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.