debug console is not working and stdout has wrong file descriptor
See original GitHub issueEnvironment data
- VS Code version: 1.21.1
- Extension version (available under the Extensions sidebar): 2018.3.1
- OS and version: Windows Server R2
- Python version (& distribution if applicable, e.g. Anaconda): Anaconda 2.7.14
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): XXX
- Relevant/affected Python packages and their versions: XXX
Actual behavior
I have experimented a deep learning code with two computers, and all codes worked well without any bugs.
After I restart vscode two days ago, I have some troubles about print on one computer.
When I started the code, vscode show the terminal with the commands. (I remember that the vscode show the debug console first.)
and the running is immediately stopped.
The error occurred in print function.
the error message is
IOError: [Errno 9] Bad file descriptor
and the return of the sys.stdout.fileno() and sys.stderr.fileno() is -2.
and the change of strout to nullwriter makes the code run.
This problem occured my second computer either, after the restart of the vscode…
How can I solve this problem?
Expected behavior
XXX
Steps to reproduce:
- XXX
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
XXX
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
XXX
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top GitHub Comments
This has changed, the default is now the terminal. You can change this to the debug console.
Please could you provide a sample to replicate this issue.
I got same error when i print something… There is a workound method is set “console”:“none” in launch configurations
That error won’t occurred
FYI