Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError and NameError in multi_color_ensemble notebook #105

Open
raeesahhy opened this issue May 31, 2024 · 1 comment
Open

ImportError and NameError in multi_color_ensemble notebook #105

raeesahhy opened this issue May 31, 2024 · 1 comment

Comments

@raeesahhy
Copy link

Hi everyone,

I'm trying to run the multi_color_ensemble notebook but I get an ImportError when importing the required packages:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[2], line 22
     20 from numpy.typing import ArrayLike
     21 from ultrack import track, to_tracks_layer, tracks_to_zarr # to_trackmate, 
---> 22 from ultrack.utils import labels_to_edges
     23 from ultrack.config import MainConfig
     25 from ultrack.imgproc import normalize

ImportError: cannot import name 'labels_to_edges' from 'ultrack.utils' (/home/abigail/miniforge3/envs/ultrack/lib/python3.10/site-packages/ultrack/utils/__init__.py)

This may have caused the following NameError when running the cell to remove background noise:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[7], line 1
----> 1 foreground = create_zarr(imgs.shape, imgs.dtype, "foreground.zarr", chunks=chunks, overwrite=True)
      2 array_apply(
      3     imgs,
      4     out_array=foreground,
   (...)
      7     axis=(0, 3),
      8 )
     10 normalized = create_zarr(imgs.shape, np.float16, "normalized.zarr", chunks=chunks, overwrite=True)

NameError: name 'create_zarr' is not defined

I would appreciate advice on how to proceed.

@JoOkuma
Copy link
Member

JoOkuma commented May 31, 2024

Hey @raeesahhayatudin.

We made a mistake when renaming the labels_to_edges function. Thanks for pointing this out.

We fixed this issue in #104.

Could you try updating ultrack with pip install git+https://github.com/royerlab/ultrack or using the new version of the multi_color_ensemble.ipynb?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants