首页 > 解决方案 > Dell Boomi 应用程序 (atom.exe) 找不到 python 解释器

问题描述

此错误与 Dell Boomi 有关,但我认为根本原因更普遍,这就是我决定将其发布在这里的原因

我正在探索程序命令形状以了解它的工作原理和限制。到目前为止,我成功执行了 bat、vbs 和 jar 文件(尽管最后两个仅在实际路径\命令之前执行“cmd /c”之后,即“cmd /c C:\Users\UserX\Desktop\Boomi\hi.罐”)

我想接下来执行 python,但我遇到了“找不到默认 Python”的问题。现在,在您回答“设置环境变量”之前,我已经完成了用户变量和系统变量都具有 python.exe 的路径。当我打开命令提示符时,我可以从任何地方执行脚本 (hi.py),包括安装 atom 的文件夹,即 atom 的上下文。

当我将 python 启动器设置为调试模式(PYLAUNCHER_DEBUG=1)时,我在命令提示符下运行时得到以下转储:

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

如您所见,执行成功,但是在 boomi 上运行相同的命令( cmd /c set PYLAUNCH_DEBUG=1 & C:\Users\UserX\Desktop\Boomi\hi.py)时,这是转储:

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.

如您所见,boomi 在 C:\Users\UserX\AppData\Local\Programs\Python\Python37-32\python.exe 找不到默认解释器

通过比较日志,我的猜测是 boomi 无法在 HKCU 中打开密钥?

我进入regedit查看python文件夹的权限并且所有帐户至少具有读取权限,所以除非Boomi使用某种隐藏帐户或临时帐户(我相信它会使用我的帐户,因为atom.exe正在运行它),我不知道为什么它无法读取密钥。

让我来到这里的一般问题是:是否可以拒绝应用程序对 HKCU 的读取访问权限,如果是,我如何将其授予特定应用程序?

标签: pythonboomi

解决方案


好吧,很明显,在花了几个小时在这之后,在我在这里发布之后,我找到了解决方案,这很明显。

我杀死了 atom.exe 并以管理员身份运行它,现在它可以读取密钥并运行 python


推荐阅读