I’m having an issue with the lumapi.getVar functionality. I’m trying to extract some variables from the project’s workspace but I’m receiving the following error
'Failed to get variable' C:\...\lumapi.py:144
Which is an exception raised when:
ec = iapi.appGetVar(handle, varname.encode(), byref(value)) if ec < 0: raise LumApiError("Failed to get variable")
Can anyone please point me on to why I’m having this issue when I’m extracting a simple variable from MODE? Also, what does the ec variable in the API stand for here?
I have also noticed an issue with Lumerical applications crashing when Python API getVar calls non-existent variable. Can there be an except raised in the API instead of crashing the application?