SynapseWeb / PyReconstruct

GNU General Public License v3.0
8 stars 2 forks source link

.Zarr Image Export Broken #19

Closed AndrewLyon closed 7 months ago

AndrewLyon commented 9 months ago

Describe the bug When attempting to convert images into .zarr format, macos (both arm and x64 versions of pyreconstruct) fails to process images into the .zarr format. When prompt opens to show conversion activity, the process simply states that it needs to be provided arguements, then reports that it has been completed. The same process works correctly on windows 10/11.

To Reproduce Steps to reproduce the behavior:

  1. Go to Series > Images > convert to zarr
  2. See error: Please provide arguments Zarr processing finished. You can close this window.

Expected behavior .zarr folder created at the location chosen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Python (please indicate the version of Python you are using):

Additional context Add any other context about the problem here.

quasiTriestino commented 9 months ago

Thanks for the note! So I'm sure I understand: Everything seems to be working ok on your Windows setup but failing in macOS 14.3.1? And you're working from the main branch at the most recent commit?

Also: For the time being, PyReconstruct will likely fail at some point when run in Python 3.12. Best to install into a virtual environment running 3.11. (Some of its dependencies don't support 3.12.)

We'd like to make sure the zarr converter is working on all platforms, since you get a significant boost in speed when working with larger images. This is a huge improvement over legacy reconstruct.

Would you also please copy and paste the error message you get in the console here?

AndrewLyon commented 8 months ago

Surprisingly enough, I don't get an error from PyReconstruct itself, but I do get a metadata error from tifffile (this is consistent with both my macOS and windows installations).

My original setup on macOS was with python=3.10, but the issue continues after reinstalling in a new environment with 3.11 installed.

Attached is what I see: image_2024-02-23_120316068

k34harris commented 8 months ago

Hi Andrew, Michael is on vacation for a couple weeks, so the response might be delayed. Thanks for your ongoing interest and efforts! Kristen Kristen M. Harris, PhD Prof, Dept. of Neuroscience Univ. of Texas at Austin *k @.>@. @.>, synapseweb.clm.utexas.edu http://synapseweb.clm.utexas.edu/, 3DEM.org Pronouns: She, Her, Hers

On Fri, Feb 23, 2024 at 2:03 PM AndrewLyon @.***> wrote:

Surprisingly enough, I don't get an error from PyReconstruct itself, but I do get a metadata error from tifffile (this is consistent with both my macOS and windows installations).

My original setup on macOS was with python=3.10, but the issue continues after reinstalling in a new environment with 3.11 installed.

Attached is what I see: image_2024-02-23_120316068.png (view on web) https://github.com/SynapseWeb/PyReconstruct/assets/143132070/95b36861-a78e-4a5c-b972-1d9860f94fce

— Reply to this email directly, view it on GitHub https://github.com/SynapseWeb/PyReconstruct/issues/19#issuecomment-1961915336, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHOUZX4KYVGQ3HZNWXMFATYVDYZJAVCNFSM6AAAAABDR72CNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRRHEYTKMZTGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

quasiTriestino commented 8 months ago

Hello again - I wasn't able to reproduce this problem on a colleague's machine with your specs; however, from the console output, I see where the issue is.

Because the process of converting to zarr can in some cases take a while, PyReconstruct fires up an asynchronous process while allowing you to continuing tracing or otherwise work on your computer. This is, for some reason, failing on your setup. We're going to implement a try/except block to see if this gets around this issue.

I'm just back from vacation, so I will let you know when we're done with this and will ask you to give it a spin. Thanks!

quasiTriestino commented 8 months ago

@AndrewLyon Commit 6a4ec19d8fe07f972e1437e3669c84469db94422 (pushed to the main branch) introduces very minor changes to the main method of the zarr converter module. When you have a second, would you please give the converter a try through the GUI on your machine and let us know how it goes? Thanks!

AndrewLyon commented 8 months ago

Hi there, the .zarr conversion is still not working. This issue still applies to both my regular pyreconstruct environment (python 3.10) and my test environment (python 3.11).

I do want to note that the images are located on an external drive (if that matters), though terminal does have the appropriate access to all file locations on my system.

quasiTriestino commented 8 months ago

And you're still getting a message asking you to "Please provide arguments" in the zarr converter window?

AndrewLyon commented 8 months ago

Unfortunately, I've been using a windows vm to convert images to .zarr. Thank you!

quasiTriestino commented 8 months ago

@AndrewLyon We have created a new branch to try to suss out this issue. The branch is fix/zarr-args. When you have a second, would you please check out the branch and try to convert a series to zarr in your mac setup? If it works, great -- if not, would you please paste a screen shot of the messages you get in the converter window?

AndrewLyon commented 7 months ago

With the branch, this is what I get:

SS Test
julian-falco commented 7 months ago

@AndrewLyon From the arguments shown, it appears that one of your folders intended to contain the zarr file contains a space (12_15_2023 Backup_EMMAdata copy ). The shell interprets it as completely separate arguments rather than as a single filepath. I will see if this can be screened for in the code, but in the meantime, could you rename the folder(s) so that there are no spaces in the filepath and try again?

AndrewLyon commented 7 months ago

removing the space works, thanks a ton!