question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 print('test')

AREPL OUTPUT

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Almenoncommented, Mar 8, 2020

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 😃

1reaction
lemirsercommented, Mar 8, 2020

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.

  1. Ensure none of the Python paths are configured in the settings.json file (leave them to their defaults).
  2. Open your terminal (command) window and activate the relevant Python environment
  3. Close all instances of VS Code
  4. 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PATH ENOENT · Issue #264 · Almenon/AREPL-vscode - GitHub
Error in the AREPL extension! Error running python with command: C:\Users\0.0\AppData\Local\Programs\Python\Python37 ...
Read more >
AREPL extension error in VSCode with Python 3.7
When I start editing the code, instead of showing me the real time output, I get: 'py' is not recognized as an internal...
Read more >
AREPL for python - Visual Studio Marketplace
AREPL automatically evaluates python code in real-time as you type. ... Error display: The instant you make a mistake an error with stack ......
Read more >
arepl/Lobby - Gitter
Hi, installed ur extension but doesn't seem to work, I get this error "command ... If you ever have any questions or feedback...
Read more >
Arepl NPM
Error display: The instant you make a mistake an error with stack trace is shown. Settings: AREPL offers many settings to fit your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found