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.

TypeError Cannot read property 'setEncoding' of undefined

See original GitHub issue

TypeError: Cannot read property 'setEncoding' of undefined 	at /Users/anon/.vscode/extensions/almenon.arepl-1.0.14/node_modules/python-shell/index.js:99:39 
	at Array.forEach (<anonymous>) 	
at new PythonShell (/Users/anon/.vscode/extensions/almenon.arepl-1.0.14/node_modules/python-shell/index.js:97:39)
 	at PythonEvaluator.startPython (/Users/anon/.vscode/extensions/almenon.arepl-1.0.14/node_modules/arepl-backend/index.js:111:24) 	
at PreviewManager.startAndBindPython (/Users/anon/.vscode/extensions/almenon.arepl-1.0.14/out/src/PreviewManager.js:153:34) 	
at PreviewManager.<anonymous> (/Users/anon/.vscode/extensions/almenon.arepl-1.0.14/out/src/PreviewManager.js:52:18) 	
at Generator.next (<anonymous>) 	
at __awaiter (/Users/anon/.vscode/extensions/almenon.arepl-1.0.14/out/src/PreviewManager.js:7:71) 	at new Promise (<anonymous>) 	at __awaiter (/Users/anon/.vscode/extensions/almenon.arepl-1.0.14/out/src/PreviewManager.js:3:12) 	at PreviewManager.startArepl (/Users/anon/.vscode/extensions/almenon.arepl-1.0.14/out/src/PreviewManager.js:40:16) 
	at vscode.commands.registerCommand (/Users/anon/.vscode/extensions/almenon.arepl-1.0.14/out/src/extension.js:12:24) 	at d._executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:477:621) 	

If you run into this issue please let me know what python path you have configured.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Almenoncommented, Jul 14, 2019

Thanks for giving me the python path - For some reason one of ‘stdout’, ‘stdin’, ‘stderr’ is null after spawning the process and I’m not sure why. I just have a windows laptop at the moment but once I get back home I’ll be able to test python paths on my ubuntu VM. In the meantime I would suggest using python3 instead of anaconda for AREPL if possible. AREPL doesn’t support anaconda very well because the anaconda environment needs to be activated to work properly.

0reactions
Almenoncommented, Aug 2, 2019

note to self: https://github.com/extrabacon/python-shell/pull/191 might change the error - I’m guessing when that gets merged in the error would be “stdin not open for writting”

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Cannot read property 'setEncoding' of undefined
I am trying to process a bunch of images using imagemagick and node . I have a folder of images, iterate through them,...
Read more >
Cannot read property 'setEncoding' of undefined #145505
TypeError : Cannot read property 'setEncoding' of undefined at setEncoding in extensions/git/src/git.ts:1877:18 at new Promise ( ) at x.
Read more >
nodejs/node - Gitter
js:17 options.agent = new https.Agent(options); ^ TypeError: Cannot read property 'Agent' of undefined at Object.<anonymous> (/data/opt/app.js:17:26) at Module.
Read more >
[SOLVED] Cannot read property 'encode' of undefined
Hello, i'm working with the js client and Playcanvas. The client is correctly created, i'm using the lastest nakama-js.umd.js and correctly ...
Read more >
What is the setEncoding function in Node.js? - Educative.io
If the programmer does not specify an encoding, it is not set to any default value. Some of the most common character encoding(s)...
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