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

When using IPython, window.activate() raises error. #29

Open
vidhanio opened this issue Jul 20, 2020 · 1 comment
Open

When using IPython, window.activate() raises error. #29

vidhanio opened this issue Jul 20, 2020 · 1 comment

Comments

@vidhanio
Copy link

When I am testing my code with IPython, using window.activate() raises an error.
When writing the same exact code into a .py file and running it, it works as expected.

Code:

        # activate Bloons TD 6 window.
        btd6_window = pygetwindow.getWindowsWithTitle("BloonsTD6")[0]
        btd6_window.activate()

Error:

c:\program files\python38\lib\site-packages\pygetwindow\_pygetwindow_win.py in _raiseWithLastError()
     95     information from GetLastError() and FormatMessage()."""
---> 97     raise PyGetWindowException('Error code from Windows: %s - %s' % (errorCode, _formatMessage(errorCode)))
     98
     99

PyGetWindowException: Error code from Windows: 997 - Overlapped I/O operation is in progress.
@vidhanio
Copy link
Author

#16 is related, and the workaround used there also works here.

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

1 participant