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

Infinite loop when using fabioimage as iterator #468

Closed
kif opened this issue Apr 1, 2022 · 2 comments · Fixed by #474
Closed

Infinite loop when using fabioimage as iterator #468

kif opened this issue Apr 1, 2022 · 2 comments · Fixed by #474
Assignees
Labels

Comments

@kif
Copy link
Member

kif commented Apr 1, 2022

import fabio, numpy
img = numpy.arange(110).reshape((10,11))
f = fabio.limaimage.LimaImage(data=img)
f.save("example.h5")
g = fabio.open("example.h5")
g.nframes
for i,j in enumerate(g): print(i, j.shape)
#So far so good

f.save("example_0001.h5")
g = fabio.open("example_0001.h5")
g.nframes
# Now things are geting crazy
for i,j in enumerate(g): print(i, j.shape, j.filename, j.currentframe, id(j))
# infinite loop
@kif
Copy link
Member Author

kif commented Apr 1, 2022

LimaImage is affected but EdfImage is clean ... maybe the bug is only in LimaImage

@kif kif added the bug label Apr 1, 2022
@kif kif self-assigned this Apr 1, 2022
@kif
Copy link
Member Author

kif commented Apr 1, 2022

The bug exists only when the basename ends with "1"

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

Successfully merging a pull request may close this issue.

1 participant