Python process terminated unexpectedly after snapping 100-150 photos

조회 수: 6 (최근 30일)
Bera
Bera 2024년 8월 27일
답변: Subhajyoti 2024년 9월 2일
Hey All
Basically as the title suggests, I am using MATLAB to call a opython function that snaps raw images and creates plots, however, when I snap close to 100-150 photos I tend to get an error that says process terminated unexpectedly. Any Sort of help would be much appreciated!
  댓글 수: 2
Walter Roberson
Walter Roberson 2024년 8월 27일
(This is not something that Image Analyst would be expected to know something about. He does not have much experience calling Python)
Bera
Bera 2024년 8월 27일
Oh sorry I meant like the process I’m soing requires image analysis

댓글을 달려면 로그인하십시오.

답변 (1개)

Subhajyoti
Subhajyoti 2024년 9월 2일
Hi @Bera,
There may be a runtime dependency conflict between MATLAB and Python.
In general, using out-of-process execution mode will avoid these conflicts. For this reason, using out-of-process mode is the best practice when using the Python Interface. You can use the “pyenv” command during App start-up to run in out-of-process mode.
>> pyenv("Version","<path to python executable>", "ExecutionMode", "OutOfProcess")
You can refer to the following link to know more about adding ‘Startup Tasks and Input Arguments in App Designer’:
Also, you may go through the following MathWorks Documentations for valuable insights about using the Python Interface in MATLAB:
I hope this helps.

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by