在Python上运行程序,Python失败

时间:2017-01-06 20:52:20

标签: python macos macos-sierra

我在Sierra 10.12.2上使用Python运行Houdini应用程序:

subprocess.Popen( '/Applications/Houdini 15.5.673/Houdini Apprentice.app/Contents/MacOS/happrentice'  )

Houdini开始启动但出现错误并且无法运行。如果我按常规方式运行应用程序,请单击一个图标,它会正常启动。

错误报告的开头

Process:               happrentice [649]
Path:                  /Applications/Houdini 15.5.673/Houdini Apprentice.app/Contents/MacOS/happrentice
Identifier:            com.sidefx.HoudiniApprentice
Version:               15.5.673 (15.5.673)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           happrentice [649]
User ID:               501

Date/Time:             2017-01-06 15:40:07.702 -0500
OS Version:            Mac OS X 10.12.2 (16C67)
Report Version:        12
Anonymous UUID:        5222C238-807C-7D74-6CFC-4C701B2E0D86


Time Awake Since Boot: 210 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
terminating with uncaught exception of type HOM_Error
abort() called

1 个答案:

答案 0 :(得分:0)

听起来该程序设计为由LaunchServices运行,而非直接运行。尝试使用open命令运行它。

subprocess.Popen( ['open', '/Applications/Houdini 15.5.673/Houdini Apprentice.app'] )