koenderinklab / OpenDDM

https://koenderinklab.github.io/OpenDDM/
Apache License 2.0
3 stars 2 forks source link

BUG: running ABfitting notebook #39

Closed mwakok closed 2 years ago

mwakok commented 2 years ago

The following error is encountered when running the AB fitting notebook on the nd2 data.

Output exceeds the [size limit](command:workbench.action.openSettings?[). Open the full output data [in a text editor](command:workbench.action.openLargeOutput?267de59f-b883-43ee-8220-b1cc818ebc23)
---------------------------------------------------------------------------
BufferError                               Traceback (most recent call last)
c:\Users\mauritskok\_projects\ddm\notebooks\abFitting.ipynb Cell 8 in <cell line: 1>()
----> [1](vscode-notebook-cell:/c%3A/Users/mauritskok/_projects/ddm/notebooks/abFitting.ipynb#ch0000007?line=0) meanSQ = meanSQ.compute()

File c:\Users\mauritskok\Anaconda3\envs\ddm_env\lib\site-packages\dask\base.py:311, in DaskMethodsMixin.compute(self, **kwargs)
    287 def compute(self, **kwargs):
    288     """Compute this dask collection
    289 
    290     This turns a lazy Dask collection into its in-memory equivalent.
   (...)
    309     dask.base.compute
    310     """
--> 311     (result,) = compute(self, traverse=False, **kwargs)
    312     return result

File c:\Users\mauritskok\Anaconda3\envs\ddm_env\lib\site-packages\dask\base.py:599, in compute(traverse, optimize_graph, scheduler, get, *args, **kwargs)
    596     keys.append(x.__dask_keys__())
    597     postcomputes.append(x.__dask_postcompute__())
--> 599 results = schedule(dsk, keys, **kwargs)
    600 return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])

File c:\Users\mauritskok\Anaconda3\envs\ddm_env\lib\site-packages\dask\threaded.py:81, in get(dsk, result, cache, num_workers, pool, **kwargs)
     78     elif isinstance(pool, multiprocessing.pool.Pool):
     79         pool = MultiprocessingPoolExecutor(pool)
...
File src\nd2\_sdk\latest.pyx:63, in nd2._sdk.latest.ND2Reader.close()

File src\nd2\_sdk\latest.pyx:66, in nd2._sdk.latest.ND2Reader.close()

BufferError: cannot close exported pointers exist
mwakok commented 2 years ago

SOLUTION:

update the installed nd2 library to version >=0.3.0 with

pip install --upgrade --user nd2

I have also updated the env.yml file accordingly.