New submission from Simon Depiets <sdepi...@gmail.com>:

A couple of users have been having issues on console output since the Fall 2017 
Creator Update on Windows 10

An OSError is triggered randomly when rewriting data on the console (typically 
with progress bars, for instance when you install a module with pip), this only 
happens with the Microsoft Console (within Powershell or cmd.exe).

It seems the windows stdout console stream returns a length double what python 
expects. I don't have the skills to go deeper than the bufferedio.c method 
_bufferedwriter_raw_write to diagnostic the issue, so I've made a very dirty 
fix (which I do not recommend) 
https://github.com/python/cpython/compare/3.5...LlianeFR:patch-1

Different unrelated use cases where an error is triggered :

https://stackoverflow.com/questions/47356993/oserror-raw-write-returned-invalid-length-when-using-print-in-python

https://github.com/Microsoft/vscode/issues/39149

----------
components: IO
messages: 307811
nosy: Simon Depiets
priority: normal
severity: normal
status: open
title: OSError: raw write() returned invalid length on latest Win 10 Consoles
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32245>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to