Skip to content
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

PROPERTYPUT fails due to invalid number of parameters expected. #1427

Closed
alexkoay opened this issue Oct 14, 2019 · 3 comments
Closed

PROPERTYPUT fails due to invalid number of parameters expected. #1427

alexkoay opened this issue Oct 14, 2019 · 3 comments

Comments

@alexkoay
Copy link

Running on Python 3.7 with pywin32 225.

I'm trying to interface with SAP GUI Scripting read-write properties, but writing to properties gives me an error as it doesn't do PUTs correctly. I've traced the issue back to commit to fix #1199 where the return value is changed from invoke_type to varkind. I believe some kind of special typing should be done with regards to PUTs instead of just sending back varkind directly.

The error I'm encountering:

File "\lib\site-packages\win32com\client\dynamic.py", line 559, in __setattr__
    self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, value)
pywintypes.com_error: (-2147352562, 'Invalid number of parameters.', None, None)
@alexkoay alexkoay changed the title PROPERTYPUT fails due to invalid number of arguments expected. PROPERTYPUT fails due to invalid number of parameters expected. Oct 14, 2019
@mhammond
Copy link
Owner

Sorry for the delay - I've started looking at this and things are a bit of a mess around this code. I've added some comments about that and I'm slowly cleaning things up a little so I can re-understand how things work :) It might take me a bit longer to untangle and I've a few other commits queued up in that direction. Please let me know if you are able to help me test things when I get a little further along - thanks!

@mhammond
Copy link
Owner

(oops - that was actually meant for #1641, but it's still relevant here, so 👍 )

@mhammond
Copy link
Owner

I think I fixed this in af54b27 - please reopen if you still have problems after the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants