Python inlinecpp: Windows error2: 'The handle is invalid'

   3119   7   0
User Avatar
Member
184 posts
Joined: June 2010
Offline
Hi,

I'm getting this same error with any inlinecpp attempts in Python operators. MSVCDir is set to VC9 and the HDK is building samples fine - is there a step I've missed for compiling inline code?

(this is Houdini 12.5.506 in Win7 64)

The following code example raises the same error:

import inlinecpp

mymodule = inlinecpp.createLibrary(“test”, function_sources=[“”“
int doubleIt(int value)
{
int x;
return value * 2;
}
”“”])

print mymodule._compiler_output()

Searching online, it seems to be a 32bit->64bit issue, but I can't get any straight solutions deeper than that.

I'd be grateful for any help or advice in setting the environment up correctly. Windows is such a pain sometimes.

Cheers

Attachments:
inlinecpp_python_error.jpg (185.9 KB)

User Avatar
Member
678 posts
Joined: July 2005
Offline
Download latest build and try again. On 497 it didn't worked on my computer erroring out something about incompatibility, just installed build 507 and it works.
User Avatar
Member
184 posts
Joined: June 2010
Offline
Thanks for the tip mantra - sadly, I'm still getting the invalid handle error
User Avatar
Member
678 posts
Joined: July 2005
Offline
Try to run it as administartor.
User Avatar
Member
184 posts
Joined: June 2010
Offline
Unfortunately, no difference.

I'll just have to keep digging around. Failing any solutions I may just move it over to a Mac. Or wait for the new Mac Pro. :-)
User Avatar
Member
678 posts
Joined: July 2005
Offline
Do you have x64 system and compiler ?
User Avatar
Member
184 posts
Joined: June 2010
Offline
This is 64bit Windows 7, and the compiler path is:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\cl.exe

…as installed by Windows SDK (3.51 framework)

I can only assume it's fine sitting in the x86 program files structure (since you can't install anywhere else). The HDK seems to be fine with it building from hcustom.
User Avatar
Member
184 posts
Joined: June 2010
Offline
Ah, ok that's a bit weird. I was going to export a sample file, but discovered…

It works if I run Houdini from a shortcut - the error only appears if I launch it from Command Line Tools (which is how I have it set to run by default).

So, good news and odd news! (is this expected behaviour, or a bug?)

Thanks for your help, even if success was a bit random I'd probably never have ran it outside command line otherwise! ;-)
  • Quick Links