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

After run, nothing has happened, only error in console #2

Open
cernyjan opened this issue May 31, 2019 · 4 comments
Open

After run, nothing has happened, only error in console #2

cernyjan opened this issue May 31, 2019 · 4 comments
Labels

Comments

@cernyjan
Copy link

QWindowsContext: OleInitialize() failed: "COM error 0xffffffff80010106 RPC_E_CHANGED_MODE (Unknown error 0x080010106)"

@bobdijs
Copy link

bobdijs commented Jul 29, 2019

Same here

@LZong-tw
Copy link

I found a workaround here: https://stackoverflow.com/questions/51284268/windowscontext-oleinitialize-failed-com-error-0x80010106-rpc-e-changed-mode

It works for me.

@bernd-wechner
Copy link

I tried that work around and did not work for me. Windows 10, Python 3.7. In fact it bombs with:

python .\py_inspect.py
QWindowsContext: OleInitialize() failed:  "COM error 0xffffffff80010106 RPC_E_CHANGED_MODE (Unknown error 0x080010106)"
Traceback (most recent call last):
  File ".\py_inspect.py", line 151, in <module>
    main()
  File ".\py_inspect.py", line 16, in main
    w = MyWindow()
  File ".\py_inspect.py", line 45, in __init__
    self.__initialize_calc()
  File ".\py_inspect.py", line 54, in __initialize_calc
    self.tree_model = MyTreeModel(self.element_info, _backend)
  File ".\py_inspect.py", line 81, in __init__
    self.__get_next(element_info, self.branch)
  File ".\py_inspect.py", line 85, in __get_next
    self.__generate_props_dict(child)
  File ".\py_inspect.py", line 100, in __generate_props_dict
    ['enabled', str(element_info.enabled)],
  File "C:\Users\berndw\AppData\Local\Continuum\anaconda3\lib\site-packages\pywinauto\uia_element_info.py", line 321, in enabled
    return bool(self._element.CurrentIsEnabled)
_ctypes.COMError: (-2147024891, 'Access is denied.', (None, None, None, 0, None))

Ironically, I run it in Eclipse + PyDev to see what's up, and it runs fine. Takes ages to start, but doesn't crash and I can use it. Go figure.

@vx-i
Copy link

vx-i commented Sep 3, 2020

Good morning all, I did a pull request with the workaround from Stack Overflow -> #4

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

No branches or pull requests

6 participants