You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
Python version (& distribution if applicable, e.g. Anaconda): CPython 3.7 using pythonw.exe
Using VS Code or Visual Studio: VS
Actual behavior
None has no attribute encoding exception
Expected behavior
Either sys.stdin.encoding works, or sys.stdin is None (it is None when running without debugging)
Steps to reproduce:
Debug this code using pythonw.exe (no console)
import sys
with open('issue4866.txt', 'wt') as f:
f.write('hello\n')
f.write(str(type(sys.stdin)) + '\n')
if sys.stdin is not None:
f.write(str(sys.stdin.encoding) + '\n')
f.write('bye\n')
Environment data
Actual behavior
None has no attribute encoding exception
Expected behavior
Either sys.stdin.encoding works, or sys.stdin is None (it is None when running without debugging)
Steps to reproduce:
From microsoft/PTVS#4866
The text was updated successfully, but these errors were encountered: