[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-10 Thread Simon Depiets

Simon Depiets <sdepi...@gmail.com> added the comment:

The issue doesn't seem to happen on either 3.6 (with the new stdio mode) or 
with win_unicode_console enabled.

I was able to reproduce it on 3.6 with the PYTHONLEGACYWINDOWSSTDIO flag 
enabled, it's easier to trigger when using directional keys or mouse clicks 
within the console.

chcp : Active code page : 437

System locale : en-us

--

___
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



[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-07 Thread Simon Depiets

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