Skip to content

The check for whether MATLAB is still connected is not working all the time.  #3

Description

@raacampbell

This otherwise would not happen

python present_one_stim.py
Attempting MATLAB connection...
Connected!
Exception ignored in: <function bridge.__del__ at 0x000002196CC1CC10>
Traceback (most recent call last):
  File "C:\Users\shopp\miniconda3\lib\site-packages\zapit_python_bridge\bridge.py", line 57, in __del__
  File "C:\Users\shopp\miniconda3\lib\site-packages\zapit_python_bridge\bridge.py", line 62, in release_matlab
  File "C:\Users\shopp\miniconda3\lib\site-packages\matlab\engine\matlabengine.py", line 117, in __getitem__
  File "C:\Users\shopp\miniconda3\lib\site-packages\matlab\engine\matlabengine.py", line 140, in __validate_engine
matlab.engine.engineerror.RejectedExecutionError: MATLAB has already terminated

(base) C:\Users\shopp\Dropbox (UCL)\work\Matlab_Scripts\ZapitOptostim\zapit-python-bridge\examples>

The script is:

import zapit_python_bridge.bridge as zpb
from time import sleep

hZP = zpb.bridge()


hZP.send_samples(conditionNum=-1, hardwareTriggered=False)
sleep(0.75)
hZP.stop_opto_stim()
sleep(0.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions