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

Issue with the dashboard #1

Closed
quantumm opened this issue Apr 26, 2021 · 4 comments
Closed

Issue with the dashboard #1

quantumm opened this issue Apr 26, 2021 · 4 comments

Comments

@quantumm
Copy link

Hi !

I tried this plugin with Ocean Optics USB4000 spectrometer and it works fine if I use it from a daq_viewer for exemple.
But if then I try to launch a dashboard then a window appears with this error

OIeInitialize failed

I am sure it comes from this plugin since when I uninstall it the dashboard runs perfectly.

My system :

Windows 10
pymodaq 3.1.2

@rgeneaux
Copy link

rgeneaux commented Jul 9, 2021

Hi,
I encountered this issue with several plugins, and it does get triggered only by the dashboard.
I think it has to do with a conflict between Qt and import clr. I got it fixed by following pythonnet/pythonnet#439
and adding this:

import pythoncom
pythoncom.CoInitialize()

at the very beginning of daq_1Dviewer_Omnidriver.py

(get the pythoncom module by pip install pywin32)
It does the job for now, but it is not ideal to add this to all plugins that use clr, we should try to fix it in pymodaq itself!

@seb5g
Copy link
Contributor

seb5g commented Jul 12, 2021

Hi,
It is indeed a new problem that appeared also when using the thorlabs plugins (also using pythonnet and import clr)
I tried to track it down and already found one issue in the viewer where a direct import :
from PyQt5 import Qt
was generating the error
I patched this in the 3.1.3 version however some issues remains. Please test it like this (without the pythoncom.CoInitialize() ) and let us know!

@seb5g
Copy link
Contributor

seb5g commented Jul 12, 2021

by the way this overall issue can be completely removed if you start directly with the DAQ_Scan (you just have to enter in the config file the correct preset). It's not a perfect way but...

@seb5g
Copy link
Contributor

seb5g commented Oct 22, 2021

This is now taken care of at initialization of pymodaq. It only require to install the pywin32 package containing "pythoncom"

@seb5g seb5g closed this as completed Oct 22, 2021
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

3 participants