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

Exception raised in bytes_to_read() intermittently on windows #440

Closed
chrisc11 opened this Issue Apr 30, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@chrisc11

chrisc11 commented Apr 30, 2017

On windows I occasionally hit this line https://github.com/pyinvoke/invoke/blob/master/invoke/platform.py#L162 and then hit an exception because struct is not imported for windows. However, the TODO on L159 suggests maybe code should never get there in the first place? Adding or WINDOWS on 160 seemed to resolve my issue

@bitprophet

This comment has been minimized.

Member

bitprophet commented May 1, 2017

Yea, that's just an outstanding TODO, I was paranoid that maybe there was a corner case where some folks could be "on Windows" but still be able to run ioctl. Seems pretty darn unlikely.

It's funny that you're only getting it intermittently...I'd expect it to be a hard pass/fail. Perhaps it's only the times where you're triggering has_fileno by changing in/out streams, running with/without a pty, or similar.

Anyway, thanks for the report, I'll just slap that or WINDOWS in and we'll call it good.

@bitprophet bitprophet added this to the 0.15.x milestone May 1, 2017

@bitprophet bitprophet closed this in 97c60c0 May 1, 2017

@chrisc11

This comment has been minimized.

chrisc11 commented May 2, 2017

Thanks!! Yeah, I was a little confused why it was intermittent as well. For what it's worth, the command that was failing for me was invoking pyserial/miniterm using ctx.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment