I am trying to run a function written in matlab in a python script using matlab.engine.
The first time I run the script everything works fine, but when I try to run the script again I get the error "ImportError: cannot import name 'TimeoutError'" on importing the matlab engine. Restarting the kernel allows me to run the script again. I am also using import matlab.engine and not from matlab.engine import to avoid circular importing.
Any suggestions on how I can solve the issue? I am using Ubuntu 16.04 and working with spyder.
Many Thanks!