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

pop index out of range error in pixelclassification workflow #1244

Closed
soledis92 opened this issue Jul 5, 2016 · 4 comments · Fixed by #2889
Closed

pop index out of range error in pixelclassification workflow #1244

soledis92 opened this issue Jul 5, 2016 · 4 comments · Fixed by #2889

Comments

@soledis92
Copy link

soledis92 commented Jul 5, 2016

There is an issue with dropping the channel axis during prediction export in the pixelclassification applet.

How to replicate:
During prediction export if the axis order in the image export options is set from e.g. yxc to yx (dropping the channel) after closing the options menu saving the project leads to an "pop index out of range IndexError". If the project is closed in that condition it can't be opened again.

The only work around to save the labels was to manually add an empty channel axis to the hdf5 project file. After that the project can be opened again.

Image of the error:
error

Cheers, Adrian

@k-dominik k-dominik added the needs-check added to issues where it is unsure, whether the condition still persists label Jan 21, 2019
@snajder-r
Copy link

I can confirm the issue still persists in 1.3.2 rc1. Encountered this exact issue in the autocontext workflow when trying to save predictions as zyx instead of zyxc.

@k-dominik
Copy link
Contributor

thx a lot for checking @snajder-r

@k-dominik k-dominik added data-selection and removed needs-check added to issues where it is unsure, whether the condition still persists labels Apr 29, 2019
@k-dominik
Copy link
Contributor

can confirm this still is an issue

related (in a way): ilastik/volumina#263

@i3v
Copy link

i3v commented Jul 16, 2024

I just ran into this and this when trying to export a prediction (Simple segmentation). The original image is yxzc (3D + 3 colors). I assumed that the prediction is 3D, so I set Transpose to Axis Order to zxy, which caused the error. (If I set zxyc instead, everything works as expected).

Once I get the "pop index out of range IndexError" error, there seem to be no way back - weird errors start to happen. Even and attempt to delete all exports (the "Delete All" button) causes an error:

---------------------------
SlotNotReadyError
---------------------------
Can't get data from slot <class 'lazyflow.operators.ioOperators.opExportSlot.OpExportSlot'>.ExportPath yet. It isn't ready. First upstream problem slot is: OpExportSlot/OpExportSlot.Input []: 	{_ready : False, has_mask : None, _dirty : False}

 (Advanced information about this error may be found in the log file: <...>\AppData\Local\ilastik\Logs\log.txt)

---------------------------
OK   
---------------------------

Moreover, (it looks like) I was stupid enough to save the project after the error.
As a result, my project file got damaged and the "pop index out of range" error was now preventing me from loading the project.

Thankfully, the fix was pretty easy. Just in case anyone would need this:

import h5py
input = r'C:\project\project.ilp'
with h5py.File(input,  "a") as f:
    del f['Prediction Export']

The versions of the python packages I used:

python = "==3.7.9"
h5py = "==3.7.0"

Based on "C:\Program Files\ilastik-1.4.0.post1-gpu\conda-meta").

Ilastik 1.4.0.post1.

btbest added a commit to btbest/ilastik that referenced this issue Jul 22, 2024
btbest added a commit to btbest/ilastik that referenced this issue Jul 23, 2024
@btbest btbest closed this as completed in 2d44e13 Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants