'std::exception' when calling python function to open GUI from MATLAB
2 次查看(过去 30 天)
显示 更早的评论
This 'std::exception' does not happen when I call the python script from, say, the terminal. I've isolated the problem to be with a GUI I launch. I am using tkinter to open a GUI window to display some information about progress and time remaining. I thought that MATLAB would call a python function in much the same way the terminal might, but it seems that MATLAB is somehow managing the output/permissions of that python program.
Is there some permission I need to give MATLAB to permit my GUI to open and the program to continue?
I am on macOS 10.13
0 个评论
采纳的回答
Rik
2019-2-6
I haven't used python from Matlab myself, but Tkinter is mentioned in this doc page, which seems to suggest it isn't supported at all.
What you can do instead is using the system function to actually run it from the terminal, which should allow it to work normally as far as I can tell.
更多回答(1 个)
Simon Zimmermann
2019-7-3
Just in case someone out there really needs to use the py.foo.bar call from a .m script like me:
I could resolve this by just renaming the .py file, (which forces Matlab to recompile I would guess)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!