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

Acquisition breaks when frame count is only incremented by 1 in an iteration #218

Closed
Brow71189 opened this issue Jan 30, 2025 · 2 comments
Closed

Comments

@Brow71189
Copy link
Contributor

Brow71189 commented Jan 30, 2025

This is the problematic line:

if count is None or count == 1:

if count == 1, the system assumes that it is only acquiring a single frame, and then tries to reshape the data to data.shape[1:]. But also a sequence acquisition that only incremented the frame count by 1 in an iteration will lead to count == 1, resulting in an error because you cannot do data.reshape(data.shape[1:]) unless data.shape[0] == 1, but that is not guaranteed here.

I've changed this line to:

if count is None or (count == 1 and data_stream_event.source_data.shape[0] == 1):

which seems to work so far but might cause other issues that I'm not aware of. But this definitely needs a more thorough check than what is currently implemented.

@cmeyer
Copy link
Collaborator

cmeyer commented Jan 30, 2025

This seems to be a dupe of #203 (reported by @Ion-e) and was hopefully fixed yesterday by d44728a. Can you confirm?

@Ion-e
Copy link

Ion-e commented Jan 31, 2025

Unsure. I can't manage to reproduce this bug, is there any way I can get some Steps To Reproduce? (STRs) @Brow71189?

@cmeyer cmeyer closed this as completed Jan 31, 2025
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

3 participants