Bayer-Group / paquo

PAthological QUpath Obsession - QuPath and Python conversations
GNU General Public License v3.0
102 stars 16 forks source link

Windows: image file delete impossible after adding it to project when using Bioformats #23

Open ap-- opened 4 years ago

ap-- commented 4 years ago

Update

So it seems as if deleting an image file on windows in the same session that is was added via QuPathProject.add_image causes a Permission exception on Windows.

Causes I'm investigating currently:

Initial issue

So windows had two failing tests (AND loads of thread error messages that might be pytest related...) 1951a56252730605f77fe5fe4efd8214c13a71f3 fixed one of them.

~A potential reason why the windows tests fails is, that we don't have a https://anaconda.org/sdvillal/qupath QuPath v0.2.1 pkg for windows. And we're currently testing against 0.2.0-m11...~

@sdvillal it looks like ~you cancelled the CI when it was building the windows packages.~ the job failed to upload could you rerun them? ❤️

sdvillal commented 4 years ago

yes, I rerun the job already but it kept refusing the upload; I will package 0.2.2 and let's cross fingers that the CI completes this time

sdvillal commented 4 years ago

0.2.2 is now up in the channel and this time windows upload did not get stuck

Note that while I had been testing both the qupath packages and pimping it from python for a few months in linux and mac, how these things work in windows is terra incognita. If it gets nasty we probably will be better off testing using one of these free VMs from microsoft, or maybe we can use the "mycloud" thingy?

ap-- commented 4 years ago

Okay, So I can reproduce locally. And other than failing one test, we're hitting: https://github.com/jpype-project/jpype/issues/561

ap-- commented 4 years ago

windows pytest output is now spam free: a5b5cb622ad0154b4429207bbc632704d352fcbd

sdvillal commented 4 years ago

windows pytest output is now spam free: a5b5cb6

can we use pyproject.toml instead of pytest.ini?

ap-- commented 4 years ago

https://github.com/pytest-dev/pytest/issues/1556

Now that pytest 6.0 is out: yes 😄

ap-- commented 4 years ago

@sdvillal is there (and if yes what is) the best way to get openslide working with our conda qupath?

ap-- commented 4 years ago

Note: The test's on windows are using the bioformatsimageserver backend.

I believe that some filehandles are still open, because bioformats readers are not explicitly closed here: https://github.com/qupath/qupath/blob/ecac7c444f8099b288a065dd754025d19e7791d1/qupath-extension-bioformats/src/main/java/qupath/lib/images/servers/bioformats/BioFormatsImageServer.java#L975-L978

ap-- commented 4 years ago

Ah 💡

https://github.com/bayer-science-for-a-better-life/paquo/blob/b212aea59466893a6773d67db13473a21ac2f18b/paquo/tests/test_images.py#L41-L61

Is probably the difference between openslide and bioformats...