bioio icon indicating copy to clipboard operation
bioio copied to clipboard

User Warning due to dask dependency discrepancy and ND2File()

Open felixS27 opened this issue 1 year ago • 0 comments

First of all I love your package. It is the perfect tool to work with all kind of image files in python. I use it so often and I am so glad that you put in the effort to create and maintain such a wonderful package! Thank you!!! I wanted to share a User Warning I got while using this package. Context: I created a minimal virtual environment with python=3.10 bioio=1.1.0 bioio-nd2=1.0.0 on a Ubuntu 20.04.4 LTS I simply loaded a .nd2 file and extracted the image data as a numpy array with BioImage().data. While I could retrieve the array I got a dask related User warning that the ND2File was not closed before garbage collection.

./lib/python3.10/site-packages/dask/base.py:1250: UserWarning: ND2File file not closed before garbage collection. Please use with ND2File(...): context or call .close(). mod.loads(out, buffers=buffers)

After some testing I figured out that dask and distributed were both installed in version 2024.8.1. After downgrading both to version 2024.7.1 the warning disappeared. I just want to mention this, as this is at least affecting my scripts. I am not sure if you can replicate this warning and if this is an easy fix.

Thank you again!

felixS27 avatar Aug 19 '24 14:08 felixS27