Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use AREPL, getting "no active text editor open" in VScode #240

Closed
asapsmc opened this issue Apr 13, 2019 · 12 comments
Closed

Can't use AREPL, getting "no active text editor open" in VScode #240

asapsmc opened this issue Apr 13, 2019 · 12 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@asapsmc
Copy link

asapsmc commented Apr 13, 2019

Just installed AREPL extension but can't get it to work.
Whenever I try to start AREPL (with any AREPL command), a new pane containing the base AREPL window (with instructions) opens, but my code never get's previewed on that panel.
I get a message ""no active text editor open" in VScode".
Any ideas?

Below is the extension manager developer logs:
[2019-04-13 15:44:46.361] [exthost] [info] extension host started [2019-04-13 15:44:46.471] [exthost] [info] ExtensionService#_doActivateExtension mechatroner.rainbow-csv {"startup":false,"activationEvent":"onLanguage:plaintext"} [2019-04-13 15:44:46.471] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/mechatroner.rainbow-csv-1.0.0/extension [2019-04-13 15:44:46.505] [exthost] [info] ExtensionService#_doActivateExtension vscode.python {"startup":false,"activationEvent":"onLanguage:python"} [2019-04-13 15:44:46.505] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/python/out/pythonMain [2019-04-13 15:44:46.515] [exthost] [info] ExtensionService#_doActivateExtension ms-python.python {"startup":false,"activationEvent":"onLanguage:python"} [2019-04-13 15:44:46.515] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/ms-python.python-2019.3.6558/out/client/extension [2019-04-13 15:44:46.833] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:46.833] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/debug-auto-launch/dist/extension [2019-04-13 15:44:46.837] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:46.837] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/emmet/dist/extension [2019-04-13 15:44:46.844] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:46.844] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main [2019-04-13 15:44:46.880] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:46.880] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/merge-conflict/dist/extension [2019-04-13 15:44:46.907] [exthost] [info] ExtensionService#_doActivateExtension alefragnani.Bookmarks {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:46.907] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/alefragnani.bookmarks-10.4.3/dist/extension [2019-04-13 15:44:46.916] [exthost] [info] ExtensionService#_doActivateExtension christian-kohler.path-intellisense {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:46.916] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/christian-kohler.path-intellisense-1.4.2/out/src/extension [2019-04-13 15:44:46.942] [exthost] [info] ExtensionService#_doActivateExtension CoenraadS.bracket-pair-colorizer-2 {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:46.942] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/coenraads.bracket-pair-colorizer-2-0.0.28/out/src/extension [2019-04-13 15:44:47.013] [exthost] [info] ExtensionService#_doActivateExtension dbaeumer.vscode-eslint {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:47.014] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/dbaeumer.vscode-eslint-1.8.2/client/out/extension [2019-04-13 15:44:47.034] [exthost] [info] ExtensionService#_doActivateExtension esbenp.prettier-vscode {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:47.034] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/esbenp.prettier-vscode-1.8.1/out/src/extension [2019-04-13 15:44:47.303] [exthost] [info] ExtensionService#_doActivateExtension KnisterPeter.vscode-github {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:47.303] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/knisterpeter.vscode-github-0.30.2/out/src/main [2019-04-13 15:44:47.813] [exthost] [info] ExtensionService#_doActivateExtension ritwickdey.LiveServer {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:47.813] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/ritwickdey.liveserver-5.5.1/out/src/extension [2019-04-13 15:44:48.789] [exthost] [info] ExtensionService#_doActivateExtension vscode-icons-team.vscode-icons {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:48.789] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/vscode-icons-team.vscode-icons-8.5.0/out/src/ [2019-04-13 15:44:48.895] [exthost] [info] ExtensionService#_doActivateExtension wayou.vscode-todo-highlight {"startup":true,"activationEvent":"*"} [2019-04-13 15:44:48.895] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/wayou.vscode-todo-highlight-1.0.4/src/extension [2019-04-13 15:44:48.898] [exthost] [info] eager extensions activated [2019-04-13 15:46:48.380] [exthost] [info] ExtensionService#_doActivateExtension almenon.arepl {"startup":false,"activationEvent":"onCommand:extension.newAREPLSession"} [2019-04-13 15:46:48.380] [exthost] [info] ExtensionService#loadCommonJSModule /Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/extension

@Almenon
Copy link
Owner

Almenon commented Apr 13, 2019

Thanks for reporting the issue!

That's very weird. What version of vscode are you using?

The "no active text editor open" should only appear when you call arepl.currentAREPLSession without any document open. It should never appear when calling newAREPLSession - maybe you called the first command, then the second, but the "no active text editor message" popped up late? My suspicion is that that message is unrelated and the actual error is something else.

I'm guessing it's a mac-specific error. Can you go to help -> toggle developer tools, reproduce the problem, and then send me logs in the console please?

@Almenon
Copy link
Owner

Almenon commented Apr 14, 2019

I just tried reproducing the problem in my ubuntu VM and arepl worked fine :/

@asapsmc
Copy link
Author

asapsmc commented Apr 15, 2019

(Sorry for the late reply)
I'm using VSCode 1.33.1 on MacOs 10.13.6.
Below I send you the logs (from what I've seen it may concern problems with conda environment...I'de be happy if AREPL could work without any conda env, but ideally I'd like to specify a conda env)


/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] No editors associated with document: Untitled-2
t.log @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235
$logExtensionHostMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3187
_doInvokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3314
_invokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3313
_receiveRequest @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3312
_receiveOneMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3311
_protocol.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3309
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
a @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
_receiveMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:326
_socketDisposables.push._socketReader.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
acceptChunk @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:320
_register._socket.onData.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:319
t @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:328
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, Untitled-2
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] Starting Python...
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1408   ERR spawn /Users/mac/anaconda/envs/coursera EACCES: Error: spawn /Users/mac/anaconda/envs/coursera EACCES
	at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
	at onErrorNT (internal/child_process.js:406:16)
	at process._tickCallback (internal/process/next_tick.js:63:19)
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] Error: Command failed: "/Users/mac/anaconda/envs/coursera" --version
/bin/sh: /Users/mac/anaconda/envs/coursera: is a directory

	at ChildProcess.exithandler (child_process.js:303:12)
	at ChildProcess.emit (events.js:182:13)
	at maybeClose (internal/child_process.js:961:16)
	at Socket.ChildProcess.spawn.stream.socket.on (internal/child_process.js:380:11)
	at Socket.emit (events.js:182:13)
	at Pipe.Socket._destroy._handle.close [as _onclose] (net.js:596:12)
t.log @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235
$logExtensionHostMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3187
_doInvokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3314
_invokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3313
_receiveRequest @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3312
_receiveOneMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3311
_protocol.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3309
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
a @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
_receiveMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:326
_socketDisposables.push._socketReader.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
acceptChunk @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:320
_register._socket.onData.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:319
t @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:328
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot read property 'setEncoding' of undefined
t.log @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235
$logExtensionHostMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3187
_doInvokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3314
_invokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3313
_receiveRequest @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3312
_receiveOneMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3311
_protocol.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3309
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
a @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
_receiveMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:326
_socketDisposables.push._socketReader.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
acceptChunk @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:320
_register._socket.onData.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:319
t @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:328
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] stack trace: TypeError: Cannot read property 'setEncoding' of undefined
	at /Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/python-shell/index.js:99:39
	at Array.forEach (<anonymous>)
	at new PythonShell (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/python-shell/index.js:97:39)
	at PythonEvaluator.startPython (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/arepl-backend/index.js:111:24)
	at PreviewManager.startAndBindPython (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:116:30)
	at PreviewManager.<anonymous> (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:48:18)
	at Generator.next (<anonymous>)
	at __awaiter (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:7:71)
	at new Promise (<anonymous>)
	at __awaiter (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:3:12)
	at PreviewManager.startArepl (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:37:16)
	at vscode.commands.registerCommand.vscodeUtilities_1.default.newUnsavedPythonDoc.then (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/extension.js:16:42)
t.log @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235
$logExtensionHostMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3187
_doInvokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3314
_invokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3313
_receiveRequest @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3312
_receiveOneMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3311
_protocol.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3309
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
a @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
_receiveMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:326
_socketDisposables.push._socketReader.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
acceptChunk @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:320
_register._socket.onData.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:319
t @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:328
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3214 [[object Object]]Cannot read property 'setEncoding' of undefined
$onExtensionRuntimeError @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3214
_doInvokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3314
_invokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3313
_receiveRequest @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3312
_receiveOneMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3311
_protocol.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3309
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
a @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
_receiveMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:326
_socketDisposables.push._socketReader.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
acceptChunk @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:320
_register._socket.onData.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:319
t @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:328
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3214 TypeError: Cannot read property 'setEncoding' of undefined
	at /Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/python-shell/index.js:99
	at Array.forEach (<anonymous>)
	at new PythonShell (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/python-shell/index.js:97)
	at PythonEvaluator.startPython (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/arepl-backend/index.js:111)
	at PreviewManager.startAndBindPython (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:116)
	at PreviewManager.<anonymous> (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:48)
	at Generator.next (<anonymous>)
	at __awaiter (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:7)
	at new Promise (<anonymous>)
	at __awaiter (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:3)
	at PreviewManager.startArepl (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:37)
	at vscode.commands.registerCommand.vscodeUtilities_1.default.newUnsavedPythonDoc.then (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/extension.js:16)
$onExtensionRuntimeError @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3214
_doInvokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3314
_invokeHandler @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3313
_receiveRequest @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3312
_receiveOneMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3311
_protocol.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3309
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
a @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:317
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
_receiveMessage @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:326
_socketDisposables.push._socketReader.onMessage.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:323
fire @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75
acceptChunk @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:320
_register._socket.onData.e @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:319
t @ /Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:328
emit @ events.js:182
addChunk @ _stream_readable.js:279
readableAddChunk @ _stream_readable.js:264
Readable.push @ _stream_readable.js:219
onread @ net.js:636
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, Untitled-2
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, Untitled-1
/Users/mac/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:235 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, /Users/mac/Projects/CR1920M

@asapsmc
Copy link
Author

asapsmc commented Apr 15, 2019

(please correct me if this isn't the best way to send logs)

@Almenon
Copy link
Owner

Almenon commented Apr 15, 2019

interesting..... here's the relevant error:

TypeError: Cannot read property 'setEncoding' of undefined

	at /Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/python-shell/index.js:99:39
	at Array.forEach (<anonymous>)
	at new PythonShell (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/python-shell/index.js:97:39)
	at PythonEvaluator.startPython (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/node_modules/arepl-backend/index.js:111:24)
	at PreviewManager.startAndBindPython (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:116:30)
	at PreviewManager.<anonymous> (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:48:18)
	at Generator.next (<anonymous>)
	at __awaiter (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:7:71)
	at new Promise (<anonymous>)
	at __awaiter (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:3:12)
	at PreviewManager.startArepl (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/PreviewManager.js:37:16)
	at vscode.commands.registerCommand.vscodeUtilities_1.default.newUnsavedPythonDoc.then (/Users/mac/.vscode/extensions/almenon.arepl-1.0.13/out/src/extension.js:16:42)

This is a issue with the https://github.com/extrabacon/python-shell repo. Which I'm a maintainer of, actually, so I still need to fix it 😂 .

        this.childProcess = spawn(pythonPath, this.command, options);

        ['stdout', 'stdin', 'stderr'].forEach(function (name) {
            self[name] = self.childProcess[name];
            self.parser && self[name].setEncoding(options.encoding || 'utf8');
        });

The error happens when the encoding is set - one or more of stdout, stdin, or stderr is undefined.
Unfortunately work's starting soon so I don't have time to fix it right now but I'll look into this more when I'm done today.

@Almenon Almenon self-assigned this Apr 15, 2019
@Almenon Almenon added the bug Something isn't working label Apr 15, 2019
Almenon added a commit that referenced this issue Apr 17, 2019
@Almenon
Copy link
Owner

Almenon commented Apr 17, 2019

I'm guessing the issue is because you have a incorrect python path - however, arepl should show you the error and the fact that is it just exiting silently is my fault. Next update will have a change to show the error.

@Almenon
Copy link
Owner

Almenon commented Apr 17, 2019

what value do you have for arepl.pythonPath and python.pythonPath in your vscode settings?

@Almenon Almenon added this to the v1.0.14 milestone Apr 17, 2019
@Almenon Almenon closed this as completed Apr 17, 2019
@asapsmc
Copy link
Author

asapsmc commented Apr 17, 2019

After I corrected contradictory "python.path" definitions in overall settings.json and workspace settings.json, the problem is solved.
However, I always get green squiggles under "arepl.pythonpath", with the message "unknown configuration setting". The value is the same as python.path (the conda env python version I want). Do you have any idea why this is happening?

@Almenon
Copy link
Owner

Almenon commented Apr 17, 2019

yeah - that's because path needs to be capitalized, like so: arepl.pythonPath
Although arepl will use python.pythonPath by default, so if that is working for you no need to configure arepl :)

@Almenon
Copy link
Owner

Almenon commented Apr 17, 2019

Oh also note that if you are using conda you might run into some bugs - see #241 (caused by #243)

Let me know if there is further problems.

@asapsmc
Copy link
Author

asapsmc commented Apr 18, 2019

Even with "arepl.pythonPath" correctly capitalized I get green squiggles and "unknown configuration setting"...
Regarding the conda env, I'm activating it

@Almenon
Copy link
Owner

Almenon commented Apr 18, 2019

Even with "arepl.pythonPath" correctly capitalized I get green squiggles and "unknown configuration setting"...

Green squiggles should only appear if you don't have arepl installed. I honestly have no idea why that would happen :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants