Internal Arepl error: [ERR_STREAM_DESTROYED]See original GitHub issue
Hi, I’m encountering an internal arepl error when I’m running AREPL.
I’m just printing a sample string with python3.7
internal arepl error: Error stack: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed at doWrite (_stream_writable.js:413:19) at writeOrBuffer (_stream_writable.js:401:5) at Socket.Writable.write (_stream_writable.js:301:11) at PythonShell.send (c:\Users\anon\.vscode\extensions\almenon.arepl-1.0.21\node_modules\python-shell\index.js:285:20) at PythonEvaluator.execCode (c:\Users\anon\.vscode\extensions\almenon.arepl-1.0.21\node_modules\arepl-backend\index.js:62:22) at ToAREPLLogic.onUserInput (c:\Users\anon\.vscode\extensions\almenon.arepl-1.0.21\out\src\toAREPLLogic.js:79:34) at PreviewManager.onAnyDocChange (c:\Users\anon\.vscode\extensions\almenon.arepl-1.0.21\out\src\PreviewManager.js:270:51) at listOnTimeout (internal/timers.js:533:17) at processTimers (internal/timers.js:475:7)
I’m using Windows 10 64-bit and Python version 3.7.0.
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
I just managed to reproduce the error! 😄
It happens to me when I have
arepl.pythonpath set to
python3. When I execute
python3 in the command line windows thinks I don’t have python installed and brings up the windows app store with the python installation page. AREPL doesn’t expect that and throws an error.
I can add in code to handle that situation and give a more user friendly error message if that happens 😃
I can execute the
py in the command line without activating the virtual environment. I followed the steps here Option 2: Activate the Virtual Environment from your Terminal/Command Window and then launch VS Code and AREPL runs without any issue.
- Ensure none of the Python paths are configured in the settings.json file (leave them to their defaults).
- Open your terminal (command) window and activate the relevant Python environment
- Close all instances of VS Code
- Next, launch VS Code from that same terminal (command window) session
There might be a problem with my vscode settings but it works now. Thank you for your help.