labjack / LabJackPython

The official Python modules and classes for interacting with the LabJack U3, U6, UE9 and U12
https://labjack.com/support/software/examples/ud/labjackpython
MIT License
117 stars 79 forks source link

handled a bug with packing more than was read #106

Closed MickMack1983 closed 5 years ago

MickMack1983 commented 6 years ago

When readBytes is less than len(*newA) pack fails with " struct.error: pack expected 192 items for packing (got 256)"

This pull requests solves that

davelopez01 commented 6 years ago

What code or stream settings are you using to get "struct.error: pack expected 192 items for packing (got 256)", what LabJack are you using, and what operating system are you using?

davelopez01 commented 6 years ago

@MickMack1983, for me to look into this further and consider merging your commit, please provide the details I requested in my previous comment. I want to reproduce the issue you were seeing, and check on what is causing the smaller packet sizes than requested and if data is lost.

davelopez01 commented 5 years ago

Not accepting the pull request and closing.

mnaberez commented 5 years ago

I agree with the decision to not merge a pull request unless we understand it. However, I hope that @MickMack1983 can add the reproduce instructions here eventually so we can revisit it. If this bug occurred during normal usage, learning more about it might result in other changes as well. For example, it might lead to better validation of streaming settings, a change to ExoDriver, better docs, etc.