MCR Applications with Python Functions

조회 수: 1 (최근 30일)
Peter Cook
Peter Cook 2017년 6월 23일
댓글: Peter Cook 2017년 6월 23일
I am having an MCR compatiblity issue with python. When I run my application in native MATLAB (r2015b), I call a python script and it runs as intended. However once this application is compiled, I get the following error:
Undefined variable "py" or class "py.findAllDTSFiles.findAllDTSFiles".
Error in fipFinderPT>loadBinary_Callback (line 2732)
Error in gui_mainfcn (line 95)
Error in fipFinderPT (line 42)
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)fipFi
nderPT('loadBinary_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating Menu Callback
Is there a different syntax for calling python libraries in MCR applications?

채택된 답변

Robert Snoeberger
Robert Snoeberger 2017년 6월 23일
You could try the workaround suggested here .
  댓글 수: 1
Peter Cook
Peter Cook 2017년 6월 23일
That seems to work, thank you.
[Since asking the original question] I added a kludgey try-catch block that calls the script from a DOS shell, which also seems to accomplish the task.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by