[python-win32] COM server registering, but getting "The specified module could not be found" on dispatch
Russell Warren
russ at perspexis.com
Mon Dec 17 18:50:21 CET 2012
I'm having a really difficult time trying to get a simple COM server demo
working with win32com. No matter what I do I'm getting an automation error
("The specified module could not be found.") when I try and create the
object from VBA with CreateObject().
The latest COM server I'm trying to create is a tweak of some samples I've
pulled together:
http://pastebin.com/iiz8duCu
A screenshot of the simple VBA script that fails, with the exact error is
this:
http://static.inky.ws/image/3521/Selection_247.png
What could be causing this? Is there any way to get further details?
More info:
- WinXP SP3
- python version: ActivePython 2.7.2.5
- I'm using the win32com package that came with ActivePython
- The COM server seems to be registering perfectly.
- When I look up the progid in the registry myself the LocalServer32 key
is:
- C:\Python27\pythonw.exe
"C:\Python27\lib\site-packages\win32com\server\localserver.py"
{BC0212DE-F1AF-4626-9E35-424CC4723C02}
- Running the exact cmdline above (to localserver.py) myself works
perfectly. As-is it does nothing apparent, but if I strip the GUID I get
the appropriate usage msgbox.
- The InprocServer32 key specifies "pythoncom27.dll" which does exist in
my system32 folder. (I have no idea whether COM will use LocalServer32
or InprocServer32 at this point, but both seem fine. How does it decide?)
- CreateObject() is definitely picking up the registration, but it seems
to be failing internally... or at least when you pass an unregistered
progid like "foo.foo" to CreateObject() the error you get is different --
"ActiveX component can't create object"
- Registering with debugging enabled and using PythonWin's trace
collector debugging tool is showing nothing., so presumably it is failing
before anything is issued
- I can't figure out where to get any further debugging info... I
checked the Windows Event Viewer and there is nothing showing up with these
errors.
Any help in resolving this would be *greatly* appreciated!!! I don't know
where to go from here.
I've even gone so far as to bundle this up into a standalone ActiveX exe
and dll with py2exe to see if that magically resolved anything, but
(unsurprisingly) I get similar errors.
Help!
Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20121217/1714b8c6/attachment.html>
More information about the python-win32
mailing list