Page 1 of 1
Key Error
Posted: Tue 16 Aug 2022 11:26
by jonathan dumas
Dear Didier,
there is a popup window that informs me that there is a "Key error" and that the version is too old, see attached.
I updated TraceWin and the key today.
Is it possible to disable this popup window? It blocks batch calculations until I press "OK".
Cheers,
Jonathan
Re: Key Error
Posted: Wed 17 Aug 2022 09:59
by Didier
Dear Janathan,
I don't understand!
The TraceWin update didn't fix the problem, the message still appears ?
Regards,
Didier
Re: Key Error
Posted: Wed 17 Aug 2022 10:37
by jonathan dumas
Yes, it still appears after the update!
It's very random, it might be after a few hundreds of TraceWin uses
I can add in my script a function (hereafter in case someone has the same problem, for Windows/Python) to press all the time on the ok button of this window in case it appears but it's not ideal:
Code: Select all
import win32gui, win32con, win32api
from datetime import datetime
cmptErr=0
def closeKeyError(win_title):
handle = win32gui.FindWindow(0, win_title)
global cmptErr
if win32gui.IsWindow(handle):
win32api.SendMessage(handle, win32con.WM_CLOSE, 0, 0)
cmptErr+=1
else:
win32api.Sleep(60000)
print("Time:",datetime.now(),"Still Running. Key error count:",cmptErr)
while True:
closeKeyError("Key error")
Re: Key Error
Posted: Wed 17 Aug 2022 13:24
by Didier
Hi Jonathan,
I've looked at the code, but I can't see any reason for this message to appear and if it's random it's even more incomprehensible.
I have added information in the error message dialog and in the "tracewin_key.log" file to understand. So next time if you are able to keep the message or the log file, send it to me so I can understand.
Of course you still have to upgrade the code to get these extra details.
Regards,
Didier
Re: Key Error
Posted: Thu 10 Nov 2022 16:20
by Abhishek
Dear Didier,
I am using TraceWin 2.18.6.0, and I am still getting this message (as attached). May you please look into it? This occur when I run TraceWin in Batch mode for a very large number of runs.
Thank you
With Regards
Abhishek Pathak
Re: Key Error
Posted: Thu 10 Nov 2022 17:12
by Didier
Dear Abhishek,
Is it systematic or only for certain runs?
Could you tell me exactly what your bacth command is?
Do you have the same problem if you use "TraceWin_noGUI.exe" which is exactly the same code without GUI?
Regards,
Didier
Re: Key Error
Posted: Thu 10 Nov 2022 17:23
by Abhishek
Dear Didier,
I think is not systematic; sometimes, it appears consecutively sometimes it does not. My batch command is,
TraceWin config.ini path_cal=',num2str(k),'\',num2str(i),'\ Ele[',num2str(en(k)),'][2]=',num2str(F(I))
where I run a for loop over I and k and assign respective calculation directories. Here I also change the gradient of the quadrupole command. Ele[',num2str(en(k)) represents the quadrupole element number, and num2str(F(I)) stores the gradient range that I want to use.
So far, I have not tried the "TraceWin_noGUI.exe" option. I will try and see what happens.
Thank you
With Regars
Abhishek pathak
Re: Key Error
Posted: Fri 11 Nov 2022 12:21
by Didier
Dear Abhishek,
I understood the problem thanks to your various information. It is now fixed in the latest version available on our website.
Regards,
Didier