On a Vista 64 machine I have a device whose SDK is a COM dll. The dll comes in both a 32 and 64 bit version, so both are on my machine. I have a python script that can poll the data from the device and running it in IDLE with a 32 bit Python 2.5.4 and comtypes 0.6.0 I can poll data from the device - so it works! I can see everything I do on the device printed nicely in IDLE. But in Houdini (9.5.379 32 bit) with comtypes added to it's python directory, when I run the same script using either the python shell, making a python operator type, or even using the script sop, I get an error. Specifically: "AttributeError: 'module' object has no attribute [COM method]". The fact that it's throwing an error regarding an attribute in the dll makes me think that it's at least seeing the dll. This is reinforced when I turn off the device, both IDLE and Houdini post the error which says it can't find the device.
So maybe this just will not work in Houdini. Maybe throwing in Python COM modules into Houdini just pushes the intended use of Python in Houdini too far. But what I would like to understand is why everything works beautifully in IDLE but when I have all the right ingredients in Houdini it doesn't work. Could it possibly be some issue with the permissions Python has in Houdini to access other parts of my machine? Or could it be an issue like 32 bit Houdini is looking at the 64-bit dll (which doesn't make sense to me if the 32-bit Python can see the right dll and work. It's a shame I can't get it working since it always has seemed that I'm really close to getting this device working in Houdini. It seems that Houdini can feasibly get device information (1, 2) without going a beyond-my-power HDK route.
This post has been edited by geneome: 11 April 2009 - 08:06 PM

Sign In
Register
Help




MultiQuote

