R2021b python change - Unable to return the number of named arguments if not in an active function.
Mostrar comentarios más antiguos
In Matlab R2021b, I have problems running my python code. This problem did not exist in R2021a.
I get an error
"Unable to return the number of named arguments if not in an active function. "
I have a class defeinition, with variables and functions, written in python. The actual class connects to an webservice api.
For example I tell matlab to run python, run the api.py file, and create the class object main(). Set the output of this to a variable.
>> pobj = py.api.main()
If I want to retrieve 'data' which is a class variable I use:
>> pobj.data
The above works fine in both R2021a and R2021b.
The problem is if I want to run a class function 'func'
>> pobj.func()
In R2021a this would work.
In R2021b I get the error
"Unable to return the number of named arguments if not in an active function."
Please assist me to find a solution.
3 comentarios
Sean Gillen
el 18 de Oct. de 2021
I am not sure why this is happening but I am facing the same issue. I have found that not assigning my object to a matlab variable I was able to workl around this. See if you can run py.api.main().func() without error.
Zouhair Mahboubi
el 25 de Oct. de 2021
Having similar issue - this seems to have broken backward compatibility :s
Rory Wheeler
el 18 de Nov. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Call Python from MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!