-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pushing Python list value as COM parameter only sends NA/Empty values #233
Comments
Did some more testing. comtypes library only seems to fail on python 3.8 or above. 3.7 works just fine. |
Looks like duplication of #212 |
vasily, thanks for the heads up. I was able to test your suggested workaround (using tagVARIANT) and it seems to work now under Python 3.9. Thanks again! |
@syoo47 can you attach your C++ example code that can reproduce the issue without any debugger? |
It would be hard to provide the C++ code for this as it's an entire COM Automation server and is fairly large. I'd have to create an entire test automation server in order to reproduce this issue. Besides, it's not a problem on the C++ side (com server). It's a problem on the python side (com client) that is trying to push a simple list array as a single parameter to the com object using comtypes library. On the C++ side, the variant is received as an array with the right number of elements, but each element is empty. By converting the list object explicitly to a tagVARIANT object, the COM call now works:
If you want to reproduce this, get a demo license for EViews, then download and install the pyeviews-1.0.2 python library (not the latest), and then try the examples mentioned in the pyeviews documentation. |
@syoo47 thanks! I will make next attempt next week. |
I'm using Python 3.9.4 64-bit, with comtypes library 1.1.10. Making a method call on a COM object with a list variable as a parameter results in an empty VARIANT array to be received by the COM object. The array has the right number of elements to match the original list object, but each element is empty/NA.
This was also happening with comtypes library 1.1.8.
The text was updated successfully, but these errors were encountered: