11-17-2021 03:59 AM - edited 11-17-2021 04:03 AM
Hi,
when I run a Python-Script with DIAdem 2021 SP1 and call dd.InteractionOn("some info string"), after selecting one channel with a mouseclick and clicking on the InteractionOn pop-up to close it. When I then call dd.InteractionOn("some other info string") a second time shortly thereafter, I get the following error:
File "<COMObject <unknown>>", line 2, in InteractionOn.
pywintypes.com_error: (-2147352567, 'Exception error occurred.', (5923, 'DIAdem OCMD-Object', 'Command: "InteractionOn"\r\n\r\nA dialog with the name "INTERACTIONOFFDLG" already exists.', None, 0, 0), None)
(translated from German)
However I don't always get this error, sometimes it displays other times it doesn't. It most probably is an issue of the InteractionOn not stopping, because sometimes it stays on the screen after a mouseclick (to end the interaction) and the second InteractionOn dialog is called without refreshing the displayed info string / message.
Before I call dd.InteractionOn("...") a second time, I call dd.InteractionOff() but this doesn't help in fixing the bug.
If somebody could tell me how I may fix this bug I would be very grateful.
Thanks in advance!
Info: I use the internal Python 3.8 installation
11-18-2021 04:48 AM
Hi Codingeric,
Neither my colleague nor I can reproduce this problem. But you can try to have small delay after the command interactionon like this here:
while dd.SUDNonmodalDlgCount > 0:
dd.Pause(0.1)
Greetings
Walter
11-18-2021 06:39 AM
Hi Walter,
thanks for your reply! That did not work, as the dialog won't close, it is then stuck in a for loop. However what solved it for me was to display a message box with dd.MsgBoxDisp("some message"). An explanation may be that this is a threading issue and calling a MsgBox may interrupt the InteractionOn.
Greetings
codingeric