You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ImageSequence.Iterator on a non-stack SPIDER image leads to infinite loop. Looking into the code, EOFError is never raised because when the image isn't a stack, seek() returns gently without error.
This fixes the problem:
def seek(self, frame):
if self.istack == 0:
+ raise EOFError("attempt to seek in a non-stack file")
- return
if frame >= self._nimages:
raise EOFError("attempt to seek past end of file")
The text was updated successfully, but these errors were encountered:
If you'd like, you can create the PR directly, so that your code can be reviewed by someone for acceptance into the project. If you have any problems with this, let us know, and maybe we can help.
The other thing that would be great is a test to repeat the error, so that this doesn't get re-introduced in the future.
Using ImageSequence.Iterator on a non-stack SPIDER image leads to infinite loop. Looking into the code, EOFError is never raised because when the image isn't a stack, seek() returns gently without error.
This fixes the problem:
The text was updated successfully, but these errors were encountered: