Project

General

Profile

tietztest error

Added by Harry Kao over 13 years ago

Hi,

On the microscope PC, when we ran teitztest, we received the following error.

We have registered TecnaiCCD.dll, CAMC4.exe, and adaexep.exe

Thank you.
-------------------------------------------------------------------------------
C:\Python25\Lib\site-packages\pyscope>c:\Python25\python.exe tietztest.py
Killing any CAMC4 procs
Trying to initialize: <class 'pyscope.tietz.TietzPXL'>
Failed to initialize on try 1 of 2
Failed to initialize on try 2 of 2
Killing any CAMC4 procs
Traceback (most recent call last):
File "tietztest.py", line 15, in <module>
tietz.killCamcProcs()
File "c:\Python25\Lib\site-packages\pyscope\tietz.py", line 39, in killCamcPro
cs
killproc.Kill_Process(procname)
File "c:\Python25\Lib\site-packages\pyscope\killproc.py", line 69, in Kill_Pro
cess
Kill_Process_pid ( pid )
File "c:\Python25\Lib\site-packages\pyscope\killproc.py", line 58, in Kill_Pro
cess_pid
handle = win32api.OpenProcess(win32con.PROCESS_TERMINATE, 0, pid) #get proce
ss handle
pywintypes.error: (5, 'OpenProcess', 'Access is denied.')


Replies (2)

RE: tietztest error - Added by Jim Pulokas over 13 years ago

Since there are several Tietz drivers, the test script is trying to figure out which one to use by trial and error. It attempts to load a driver, then if it fails it will try another driver, and so on. One of the problems is that sometimes the driver partially works in that it starts up the CAMC4 process, but then fails at a later stage. Between each trial, it kills CAMC4 so ensure a clean initialization of the next trial.

It appears there is a permission problem with killing CAMC4 between the trials, but I am not sure why, because the current user is the one who started the process. It probably means we are doing something wrong in our function to kill the process. Let me know what version of Windows you have, and I will try to reproduce the problem here. Also, see if you can manually kill CAMC4 through the task manager process list. Then I know if it is specific problem with our Python code or just a user permission issue. I remember something similar to this a long time ago where even task manager could not kill CAMC4 and I had to download a special app to kill it. I think I used either Process Explorer or Process Monitor from http://technet.microsoft.com/en-us/sysinternals/bb842062
let me know what you find out.
Jim

RE: tietztest error - Added by Harry Kao over 13 years ago

The microscope PC is running Win XP.

I terminated CAMC4 process using the task manager. Tietztest can finish searching for the correct driver without error.

Thank you.

Harry

    (1-2/2)