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

soapypower/writer.py line 78 read self.header_struct struct.error: unpack requires a buffer of x bytes... #23

Open
rbenali opened this issue Nov 4, 2019 · 0 comments

Comments

@rbenali
Copy link

rbenali commented Nov 4, 2019

Hi, got this error when reading from an open-ended file: sopypower/writer.py line 78 in read self.header_struct struct.error: unpack requires a buffer of 59 bytes [https://github.com/xmikos/soapy_power/blob/master/soapypower/writer.py#L78]
Since io.read(size) rely on the underlying OS that may signal interrupt the syscall before returning exactly that size rather than less, then keep iterating syscall reading up to filling up at least header_struct size buffer before unpacking fixed the above error... "...read syscall(,,count) it is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now..."

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

1 participant