I installed the PAT Add-In and try to run the Level1 test, but it's not working. Trying to find out why. It creates the SystemInfoFile, but it looks like it can't find the file afterwards.
On a different configuration it works without problems.
C:\Temp\ProPAT>RUNME_Level1Tests
*********************************************************************************
*** ArcGIS Pro PAT (Performance Assessment Tool) ***
*** Executing Level 1 Tests ***
*** ***
*** DO NOT CLOSE THIS WINDOW DURING EXECUTION ***
*** REFRAIN FROM USING THE MACHINE WHILE THESE TESTS ARE RUNNING ***
*** ***
*** The PerfTools ArcGIS Pro Start Utility will launch and control ArcGIS Pro ***
*** ArcPy scripts will also silently execute ***
*** This command window will close when finished ***
*** ***
*** ArcGIS Pro PAT is NOT supported by Esri Technical Support ***
*** Please email perfqatools@esri.com with any issues ***
*********************************************************************************
arcProDir = "C:\Program Files\ArcGIS\Pro\"
Traceback (most recent call last):
File "C:\Temp\ProPAT\Tests\RunLevel1Tests.py", line 19, in <module>
GenerateSystemInfo.GetInfo(SystemInfoFile)
File "C:\Temp\ProPAT\.\Tests\Uses_ArcPy\Common\GenerateSystemInfo.py", line 15, in GetInfo
GPU = subprocess.check_output("wmic path win32_VideoController get name")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
C:\Temp\ProPAT>
Any clue?
Hey @jorisfrenkel
I would try running "wmic path win32_VideoController get name" in an elevated command prompt to see if this is able to be found in terms of the process itself. It also could be a path issue, you may try adding "C:\Windows\System32\wbem" to your system environmental variables. I would also attempt to run the script as administrator as well just to check that off!
Cody
Thanks!
Your reply pointed me in the right direction.
Since I am working on Windows 11, wmic is not available anymore, so Powershell has to be used.
I had to replace one line in GenerateSystemInfo.py, located in the ..\ProPAT\Tests\Uses_ArcPy\Common subfolder:
Old line:
GPU = subprocess.check_output("wmic path win32_VideoController get name")
New line:
GPU = subprocess.check_output(["powershell.exe", "(Get-WmiObject Win32_VideoController).Name"], shell=True)
I am not sure if this is the whole solution. Maybe there are other places in the tool where Powershell needs to be used.