Skip to content

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

Closed

Description

@alexkoay

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)

Activity

  1. changed the title [-]PROPERTYPUT fails due to invalid number of arguments expected.[/-] [+]PROPERTYPUT fails due to invalid number of parameters expected.[/+] on Oct 14, 2019
  2. mhammond commented on Mar 28, 2021

    @mhammond
    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!

  3. mhammond commented on Mar 28, 2021

    @mhammond
    Owner

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

  4. mhammond commented on May 29, 2021

    @mhammond
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions