Reputation: 176
This error is related to Dell Boomi but I think the root cause is somewhat more generic, that's why I decided to post it here
I am exploring the Program Command shape to see how it works and the limitations. So far I was successful on executing bat, vbs and jar files (although the last two only after implementing "cmd /c" before the actual path\command i.e "cmd /c C:\Users\UserX\Desktop\Boomi\hi.jar")
I wanted to execute python next but I am running into an issue where "Can't Find a default Python". Now, before you answer with "set environment variable", I've done that already both the user variables and the system variables have the path of python.exe. When I open the command prompt I can execute the script (hi.py) from anywhere, including the folder where the atom is installed, which is the atom's context.
When I set the python launcher to debug mode (PYLAUNCHER_DEBUG=1) I get the following dump when running on my command prompt:
launcher build: 32bit
launcher executable: Console
File 'C:\Users\UserX\AppData\Local\py.ini' non-existent
Using global configuration file 'C:\Windows\py.ini'
Called with command line: "C:\Users\UserX\Desktop\Boomi\hi.py"
maybe_handle_shebang: read 127 bytes
maybe_handle_shebang: BOM not found, using UTF-8
locating Pythons in 64bit registry
locate_pythons_for_key: C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\python.exe is a 32bit executable
locate_pythons_for_key: C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\PCbuild\win32\python.exe: The system cannot find the path specified.
locate_pythons_for_key: C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\PCbuild\amd64\python.exe: The system cannot find the path specified.
locate_pythons_for_key: C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\PCbuild\python.exe: The system cannot find the path specified.
locate_pythons_for_key: unable to open PythonCore key in HKLM
locating Pythons in native registry
locate_pythons_for_key: C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\python.exe: already found
locate_pythons_for_key: C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\PCbuild\win32\python.exe: The system cannot find the path specified.
locate_pythons_for_key: C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\PCbuild\amd64\python.exe: The system cannot find the path specified.
locate_pythons_for_key: C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\PCbuild\python.exe: The system cannot find the path specified.
locate_pythons_for_key: unable to open PythonCore key in HKLM
found configured value 'python=3.7' in C:\Windows\py.ini
search for default Python found version 3.7 at 'C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\python.exe'
run_child: about to run 'C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\python.exe "C:\Users\UserX\Desktop\Boomi\hi.py" '
child process exit code: 0
As you can see the execution is successful, but when running the same command( cmd /c set PYLAUNCH_DEBUG=1 & C:\Users\UserX\Desktop\Boomi\hi.py) on boomi, this is the dump:
Test execution of EES completed with errors.
Embedded message: Return value for program was a non-zero value [103]:
launcher build: 32bit
launcher executable: Console
File 'C:\Windows\system32\config\systemprofile\AppData\Local\py.ini' non-existent
Using global configuration file 'C:\Windows\py.ini'
Called with command line: "C:\Users\UserX\Desktop\Boomi\hi.py"
maybe_handle_shebang: read 127 bytes
maybe_handle_shebang: BOM not found, using UTF-8
locating Pythons in 64bit registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: unable to open PythonCore key in HKLM
locating Pythons in native registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: unable to open PythonCore key in HKLM
found configured value 'python=3.7' in C:\Windows\py.ini
search for default Python found no interpreter Can't find a default Python.
As you can see, boomi can't find the default interpreter at C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\python.exe
From comparing the logs, my guess is that boomi can't open the keys in HKCU?
I went into regedit to see the permissions for the python folder and all accounts have at least read permission, so unless Boomi is using some kind of hidden account or temporary account ( I believe it would use my account since the atom.exe is running on it), I have no idea why it can't read the keys.
The generic question that made me come here is: Can an application be denied read access to HKCU, and if so, how can I grant this to an specific application?
Upvotes: 0
Views: 479
Reputation: 176
Well, obviously after spending hours on this and right after posting here I find the solution and it is very obvious.
I killed the atom.exe and ran it as administrator, now it can read the keys and run python
Upvotes: 1