Mark, > So everything seems okay, right? Still the question is > why "The variant argument that was supposed to contain the > filename was VT_ERROR".
I want to share a reply from the developer of MaxIm DL. He installed Python2.4.3 and PythonWin build 208, just to be able to reproduce this error and it looks to me as if the bug could be inside PythonWin. <snip> I hadn't scrolled down far enough! Sure enough, the entries for MaxIm DL's object, interfaces, and events are there after all, and the methods and properties look much as I'd expect. It even knows the Dispatch IDs correctly: SaveImage is #39. Of course that had to be true, since it was getting into the right place inside MaxIm DL. It's just not sending the argument string, and I'm no closer to figuring out why. I tried building Python and pywin32 from source, hoping I could debug the client side. I think I was successful for python.exe, but not for the Win32 extensions. The problem is I only have VC6 and they're supposed to be compiled with VC7. Python itself provided old, unsupported .dsp (project) files for VC6 and my result seems to run OK. But I could only create win32com by hacking pieces individually, and I haven't been able to install them so that my debug Python recognizes them. I'm probably missing vital .pyc, .pyo, or other files that are automatically generated by "setup.py install"-- which I can't get to run. Well, it was worth a try. I expect Mark Hammond is far too busy to investigate, but if he shows any interest at all, tell him he can download a 30-day trial of MaxIm DL from http://www.cyanogen.com/downloads/maxim_main.htm. He'll need to know to select the Simulator camera from MaxIm CCD's Setup page once before trying any scripting. </snip> FWIW, it works from vbscript and it works from Perl and folks provided me code in these languages and I was able to run it. I'd prefer however to see it work from Python :-) vbscript: --- Dim cam Set cam = CreateObject("MaxIm.CCDCamera") cam.LinkEnabled = True if Not cam.LinkEnabled Then wscript.echo "Failed to start camera." Quit End If wscript.echo "Camera is ready, Exposing." cam.Expose 1, 1, 0 Do While Not cam.ImageReady Loop cam.SaveImage "S:\Reiner\MaxIm\1.fit" wscript.echo "Exposure is done, Image saved as 1.fit" --- Perl: --- #!perl $Cam = $WScript->CreateObject('MaxIm.CCDCamera'); $Cam->{LinkEnabled} = 1; die 'Failed to start camera' unless $Cam->{LinkEnabled}; print "Exposure[sec]: "; $exp = <>; die "Need a number!" unless $exp =~ /^\s*\d+(\.\d*)?\s*$/; $Cam->Expose( $exp, 1, 0 ); $WScript->sleep( 50 ) until $Cam->ImageReady; print "Done\n"; $WScript->sleep( 3000 ); $Cam->SaveImage( 'C:/1.fit' ); --- The Python code and the raised error due to the VT_ERROR is in my previous message. As are the links to the screenshots from PythonWin's COM Browser. If this place is not the right one to report possible bugs in PythonWin, please point me to the proper one ;-) Cheers, Reiner -- MACE - Meeting on Asteroids and Comets in Europe, 2006 May 12-14 (full moon) - Vienna, Austria http://www.minorplanets.org/ _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32