DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

InteractionOn Error

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

0 Kudos
Message 1 of 3
(353 Views)

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

Message 2 of 3
(326 Views)

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

0 Kudos
Message 3 of 3
(317 Views)