spacetx / starfish

starfish: unified pipelines for image-based transcriptomics
https://spacetx-starfish.readthedocs.io/en/latest/
MIT License
223 stars 67 forks source link

AttributeError: 'DataArray' object has no attribute 'flags' in quick start run #1952

Closed sebherbert closed 2 years ago

sebherbert commented 3 years ago

🐛 Bug

I followed the quick start documentation and ran the plot_quick_start.ipynb notebook.

It seems to be the same problem as #1887 (closed) and #1946 (open), but I'm not entirely sure I understood if that PR will be merged so I prefer opening a new issue, feel free to close it if I just have to wait :)

To Reproduce

Exactly the ones described in the quick start.

  1. conda create -n starfish "python=3.7"
  2. pip install starfish
  3. pip install seaborn
  4. Run the plot_quick_start.ipynb until the Run pipeline cell

Actual Results

Error is: (Full notebook state is traceback.txt) AttributeError: 'DataArray' object has no attribute 'flags'

Versions

Linux-5.4.0-74-generic-x86_64-with-debian-bullseye-sid Python 3.7.10 (default, Jun 4 2021, 14:48:32) [GCC 7.5.0] NumPy 1.21.0 SciPy 1.7.0 scikit-image 0.18.1 pandas 1.2.5 sklearn 0.24.2 xarray 0.18.2 sympy 1.5.1 starfish 0.2.2

Let me know if I can add anything or if there's a simple fix on my side.

kevinyamauchi commented 3 years ago

Hey @sebherbert , it's great to see you here! It could be worth taking a look at https://github.com/spacetx/starfish/pull/1951, which might fix this issue.

If you'd like to give that PR a go before it merges with master, you could check the PR out locally and install. I am happy to provide more more detailed instructions if that would be helpful!

sebherbert commented 3 years ago

Hi @kevinyamauchi! Thanks for the suggestion and offer! I can't test it today, but I'll definitely try that next week!

sebherbert commented 3 years ago

So it's better but still doesn't run entirely :)

Just to be clear on my progress: Locally checked out the #1951 PR using gh

I ran again the provided plot_quick_start notebook and obtained an error at the same "run the pipeline" cell. Registration of the image worked, but the "find_spots" function crashed. See traceback_PR1951.txt

I'll try to see if I can understand why.

neuromusic commented 2 years ago

@sebherbert there were a bunch of fixes to dependencies that just landed in #1963 that might fix the issues you're having here

sebherbert commented 2 years ago

Thanks! I'll try to have a look this week! Just to be sure that I understand right, this PR was merged into the Master and I simply have to go back to the Master branch right? I'll report asap!

kevinyamauchi commented 2 years ago

Hey @sebherbert ! You understood correctly, #1963 was merged. If you installed starfish in "editable" mode (i.e., with the -e flag, pip install -e .), you can get the update by checking out ad thenpulling the master branch. If not, you will need to re-install starfish after pulling from master (e.g., pip install --force-reinstall .). Please let us know if you run into any trouble!

sebherbert commented 2 years ago

Hello again @kevinyamauchi @neuromusic So, sorry no good news... In doubt, I simply recreated a conda environment from scratch and reinstalled starfish in there following the documentation and downloaded the plot_quick_start.ipynb notebook again. -> Still an error when running the Run pipeline cell -> traceback.txt This seems to be the same error as the one I had originally and that was apparently fixed with #1951 (with this PR I could reach the next find_spot line of the cell) I wanted to try both at the same time but realized that if I checkout to #1951 , it will undo the #1963 at the same time. So my understanding is that if I want to do this, I would have to merge #1963 onto #1951 right? I can try to do this but it might take me a while considering how many things seems to have been fixed in #1963 . Apart from this merge, is there anything else I could do to help here?

sebherbert commented 2 years ago

Ok... TLDR the PR is indeed fixing my issue :)

I've rebuild from git and it now works perfectly (python3 -m pip install .) It's using pip install starfish that doesn't work. Maybe this needs more time to update?

Thanks for the fix! I'll now be able to continue testing the other examples!

kevinyamauchi commented 2 years ago

Awesome! Thanks for letting us know, @sebherbert . Indeed, we have not made a new release, so the version on pypi is "behind" the current master.

In light of your comment, I will close this issue. Please feel free to re-open it if the issue re-emerges.