matlab_pysdk. runtime Import Error

5 次查看(过去 30 天)
File "C:\Program Files\MATLAB\MATLAB Runtime\R2022b\toolbox\compiler_sdk\pysdk_py\matlab_pysdk\runtime\deployablefunc.py", line 80, in __call__
nlhsWasSpecified, stdoutObj, stderrObj).result()
File "C:\Program Files\MATLAB\MATLAB Runtime\R2022b\toolbox\compiler_sdk\pysdk_py\matlab_pysdk\runtime\futureresult.py", line 71, in result
from matlab_pysdk.runtime import NumberOfOutputArgumentsError
ImportError: cannot import name 'NumberOfOutputArgumentsError' from 'matlab_pysdk.runtime' (C:\Program Files\MATLAB\MATLAB Runtime\R2022b\toolbox\compiler_sdk\pysdk_py\matlab_pysdk\runtime\__init__.py)
  4 个评论
Najmudeen Sibaweihi
Am using R2022b prelease version. When I open the IDE and run for the first time no error but if I re-run that's when I get the error message above. So each time I need to restart the IDE before running my script
Alexander Adeleye
Alexander Adeleye 2022-7-19
I am also having this issue. I'm running Matlab R2021b and am compiling the code into a Python package with the R2021b version of Matlab runtime (v9.11).

请先登录,再进行评论。

回答(1 个)

Chetan
Chetan 2023-9-5
I understand that you are currently facing an issue while importing the runtime during the compilation of your code into a Python package.
This issue may be occurring due to the presence of whitespaces in the Windows "%temp%" directory path. Specifically, if there are whitespaces in the Windows username, it can lead to white spaces in the "%temp%" directory path.
To resolve this, it is recommended to ensure that the Windows "%temp%" directory path does not contain any spaces. In your case, it seems that the directory "C:\Program Files" contains a space character.
Changing to a directory without spaces in the path can help resolve this issue.
Kindly refer to the following thread for a possible workaround:
The suggested workaround is to move the MATLAB directories to another folder such as “C:/” that does not contain spaces.
I hope these suggestions help you resolve the issue you are facing.
Best regards
Chetan Verma

类别

Help CenterFile Exchange 中查找有关 Python Package Integration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by