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

Propagating deletion of cells causes errors #538

Open
Teranis opened this issue Jul 15, 2024 · 2 comments
Open

Propagating deletion of cells causes errors #538

Teranis opened this issue Jul 15, 2024 · 2 comments
Labels
🐛 Bug Something isn't working

Comments

@Teranis
Copy link
Collaborator

Teranis commented Jul 15, 2024

Description:

Propagating deletion of cells causes errors because of missing frames. For details on how to reproduce it, please see the corresponding section.

Way to reproduce:

Try to delete a cell with a middle mouse click while having visited a future frame, then choose the option to propagate to all frames.
Propagating only to frames that were already visited works fine.

(Optional) Link to data to reproduce error:

No response

Terminal output:

[ERROR]: Traceback (most recent call last):
  File "C:\Users\SchmollerLab\CellACDC_dev\Cell_ACDC\cellacdc\__init__.py", line 491, in inner_function
    result = func(self, *args)
  File "C:\Users\SchmollerLab\CellACDC_dev\Cell_ACDC\cellacdc\gui.py", line 4950, in gui_mousePressEventImg2
    delID_mask = self.deleteIDmiddleClick(
  File "C:\Users\SchmollerLab\CellACDC_dev\Cell_ACDC\cellacdc\gui.py", line 23059, in deleteIDmiddleClick
    lab, _ = self.deleteIDFromLab(lab, delID)
  File "C:\Users\SchmollerLab\CellACDC_dev\Cell_ACDC\cellacdc\gui.py", line 23023, in deleteIDFromLab
    delMask = np.zeros(lab.shape, dtype=bool)
AttributeError: 'NoneType' object has no attribute 'shape'

[ERROR]: Traceback (most recent call last):
  File "C:\Users\SchmollerLab\CellACDC_dev\Cell_ACDC\cellacdc\__init__.py", line 491, in inner_function
    result = func(self, *args)
  File "C:\Users\SchmollerLab\CellACDC_dev\Cell_ACDC\cellacdc\gui.py", line 4950, in gui_mousePressEventImg2
    delID_mask = self.deleteIDmiddleClick(
  File "C:\Users\SchmollerLab\CellACDC_dev\Cell_ACDC\cellacdc\gui.py", line 23059, in deleteIDmiddleClick
    lab, _ = self.deleteIDFromLab(lab, delID)
  File "C:\Users\SchmollerLab\CellACDC_dev\Cell_ACDC\cellacdc\gui.py", line 23023, in deleteIDFromLab
    delMask = np.zeros(lab.shape, dtype=bool)
AttributeError: 'NoneType' object has no attribute 'shape'

Log file:

No response

Version information:

> 
3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
C:\Users\SchmollerLab\.virtualenvs\acdc_dev
Windows-10-10.0.19045-SP0
Cell-ACDC version: 1.4.32.dev145+g3dd1f878
@Teranis Teranis added the 🐛 Bug Something isn't working label Jul 15, 2024
@ElpadoCan
Copy link
Collaborator

Hi Timon, I just tried this and it works for me.

Also from the error message I can see that the error happens in the function deleteIDmiddleClick which is called upon clicking on the cell and not when propagating to future frames.

Can you please check if you can replicate the error? Thanks!

@ElpadoCan
Copy link
Collaborator

Hi @Teranis, disregard my last comment, I was testing with a dataset that did not have unvisited frames at all.

Anyway, I fixed it now, let me know if it works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants