"QWindowsContext: OleInitialize" and "unclosed even loop" messages

807 views
Skip to first unread message

Mark Mikofski

unread,
Jul 17, 2020, 4:48:24 PM7/17/20
to conda-forge
Hi,

I am getting these messages in IPython when I import some proprietary code that does not use Qt AFAIK,

In [2]: QWindowsContext: OleInitialize() failed:  "COM error 0xffffffff80010106 RPC_E_CHANGED_MODE (Unknown error 0x080010106)"
In [2]: exit
C:\Users\mikm\AppData\Local\Continuum\miniconda3\envs\huracan\lib\asyncio\base_events.py:622: ResourceWarning:

unclosed event loop <_WindowsSelectorEventLoop running=False closed=False debug=False>

before going down a rabbit hole to try to figure this out I thought I'd ask to see  if anyone had seen this before. I couldn't find anything on Google, SO, or in discussion groups for conda-forge, matplotlib, or Qt so maybe I'm on my own.

I believe this has something to do with the matplotlib requirements from conda-forge which bundle several packages (as pypi) that differ from the Anaconda distribution from the default channel

In [1]: import matplotlib as mpl

In [2]: mpl.get_backend()
Out[2]: 'Qt5Agg'

In [3]: import sys

In [4]: [k for k in sys.modules if 'qt' in k.lower()]
Out[4]:
['matplotlib.backends.backend_qt5agg',
 'matplotlib.backends.backend_qt5',
 'matplotlib.backends.qt_editor',
 'matplotlib.backends.qt_editor.figureoptions',
 'matplotlib.backends.qt_compat',
 'PyQt5',
 'PyQt5.sip',
 'PyQt5.QtCore',
 'PyQt5.QtGui',
 'PyQt5.QtWidgets',
 'matplotlib.backends.qt_editor._formlayout',
 'matplotlib.backends.qt_editor.formsubplottool',
 'IPython.terminal.pt_inputhooks.qt',
 'IPython.external.qt_for_kernel',
 'IPython.external.qt_loaders',
 'PyQt5.QtSvg']

Here's a conda list of packages with "qt":

(myenv) >conda list | find "qt"
pyqt                      5.12.3           py37h1834ac0_3    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtchart                 5.12                     pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
qt                        5.12.5               h7ef1ec2_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge

(*) NOTE: the packages listed by conda as pypi were installed by conda-forge -- I did not install anything from PyPI.

And a conda list of MPL:

(myenv) >conda list | find "matplotlib"
matplotlib                3.1.3                    py37_0    conda-forge
matplotlib-base           3.1.3            py37h2981e6d_0    conda-forge

I haven't tried any other versions, or deviated from the conda-forge installed recipes.

Environment:
* Windows-10 with miniconda installed in %LOCALAPPDATA%\Continuum\miniconda3
* .condarc: local env with 2 channels: conda-forge, default

(myenv) >conda config --env --show channels
channels:
  - conda-forge
  - defaults

* Python: 3.7.6 from conda-forge

Sorry if I'm barking down the wrong tree. I'm trying to isolate the issue by importing modules one at a time.

Thanks!  
Reply all
Reply to author
Forward
0 new messages