Skip to content

StdErr from ShellExec, stty: stdin isn't a terminal #14938

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

Closed
pokey opened this issue Dec 8, 2020 · 7 comments
Closed

StdErr from ShellExec, stty: stdin isn't a terminal #14938

pokey opened this issue Dec 8, 2020 · 7 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug

Comments

@pokey
Copy link

pokey commented Dec 8, 2020

When I try to run a cell in a Jupyter notebook, I get the following error:

StdErr from ShellExec, stty: stdin isn't a terminal stty: stdin isn't a terminal stty: stdin isn't a terminal stty: stdin isn't a terminal for . /Users/pokey/.venv/flashcards-test/bin/activate && echo '718d24f2-8b10-48f3-8ad3-723876a19613' && python /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py

Environment data

  • VS Code version: Version: 1.51.1
    Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
    Date: 2020-11-11T01:11:34.018Z
    Electron: 9.3.3
    Chrome: 83.0.4103.122
    Node.js: 12.14.1
    V8: 8.3.110.13-electron.0
    OS: Darwin x64 19.6.0
  • Jupyter Extension version (available under the Extensions sidebar): v2020.11.399280825
  • Python Extension version (available under the Extensions sidebar): v2020.11.371526539
  • OS (Windows | Mac | Linux distro) and version: macOS Catalina 10.15.7 (19H15)
  • Python and/or Anaconda version: Python 3.8.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Jupyter server running: Local

Expected behaviour

The cell runs

Actual behaviour

The error message above

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Open a jupyter notebook
  2. Run a cell

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

Error 2020-12-08 15:36:01: Install Missing Dependencies, Class name = f, completed in 1783ms, has a falsy return value, Return Value: undefined [Error: StdErr from ShellExec, stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
 for . /Users/pokey/.venv/flashcards-test/bin/activate && echo '718d24f2-8b10-48f3-8ad3-723876a19613' && python /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py
	at P.getActivatedEnvironmentVariablesImpl (/Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:306435)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)]
Error 2020-12-08 15:36:01: Find kernel spec, Class name = T, completed in 3845ms, has a falsy return value, Arg 1: <Uri:/Users/pokey/src/flashcards-training/notebooks/scheduler-analysis.ipynb>, Arg 2: {"jupytext":{"formats":"ipynb,py:percent"},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"}}, Arg 3: undefined, Arg 4: undefined, Return Value: undefined [Error: StdErr from ShellExec, stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
 for . /Users/pokey/.venv/flashcards-test/bin/activate && echo '718d24f2-8b10-48f3-8ad3-723876a19613' && python /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py
	at P.getActivatedEnvironmentVariablesImpl (/Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:306435)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)]
Error 2020-12-08 15:36:01: Exception attempting to start notebook:  [Error: StdErr from ShellExec, stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
 for . /Users/pokey/.venv/flashcards-test/bin/activate && echo '718d24f2-8b10-48f3-8ad3-723876a19613' && python /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py
	at P.getActivatedEnvironmentVariablesImpl (/Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:306435)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)]
Error 2020-12-08 15:36:01: DataScience Error [Error: StdErr from ShellExec, stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
 for . /Users/pokey/.venv/flashcards-test/bin/activate && echo '718d24f2-8b10-48f3-8ad3-723876a19613' && python /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py
	at P.getActivatedEnvironmentVariablesImpl (/Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:306435)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)]
Error 2020-12-08 15:36:01: DataScience Error [Error: StdErr from ShellExec, stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
stty: stdin isn't a terminal
 for . /Users/pokey/.venv/flashcards-test/bin/activate && echo '718d24f2-8b10-48f3-8ad3-723876a19613' && python /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py /Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py
	at P.getActivatedEnvironmentVariablesImpl (/Users/pokey/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:306435)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)]

@DonJayamanne
Copy link

DonJayamanne commented Dec 8, 2020

Thanks for replying this issue

Please confirm this option environment is 3.8 and it's a venv Users/pokey/.venv/flashcards-test/bin/activate

@DonJayamanne
Copy link

DonJayamanne commented Dec 8, 2020

Please could you open the python output panel and copy the contents from that too, I'm interested in the first 10 lines of the output (to see what experiments this instance of vscode belongs to)

@DonJayamanne
Copy link

We have been looking into this issue for a few days now and found that some users managed to get this working switching to the latest version of VSCode insiders.

Please could you let us know whether it works for you when you use VSCode insiders. Total help narrow down the problem.
Thanks again

@pokey
Copy link
Author

pokey commented Dec 10, 2020

Thanks for the quick response! To answer your questions:

Please confirm this option environment is 3.8 and it's a venv Users/pokey/.venv/flashcards-test/bin/activate

Yes it's a venv, but it is Python 3.7.3

Please could you open the python output panel and copy the contents from that too, I'm interested in the first 10 lines of the output (to see what experiments this instance of vscode belongs to)

User belongs to experiment group 'AlwaysDisplayTestExplorer - control'
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - experiment'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'DeprecatePythonPath - experiment'
User belongs to experiment group 'RunByLine - experiment'
User belongs to experiment group 'CustomEditorSupport - control'
User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonSendEntireLineToREPLcf'

Please could you let us know whether it works for you when you use VSCode insiders

Nope same issue with insiders' build 😕

Fwiw I have pyenv-virtualenv installed on my system, but I'm not using that for this virtualenv, and it appears that it shouldn't have an impact; when I open a terminal in VSCode here's what I get:

source /Users/pokey/.venv/flashcards-test/bin/activate
➜ python --version
Python 3.7.3
➜ which python
/Users/pokey/.venv/flashcards-test/bin/python

Note that the first line wasn't typed by me, but automatically by VSCode

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Dec 10, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-jupyter Dec 10, 2020
@karthiknadig karthiknadig added area-environments Features relating to handling interpreter environments triage bug Issue identified by VS Code Team member as probable bug labels Dec 10, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Dec 10, 2020
@jpdehollain
Copy link

jpdehollain commented Dec 11, 2020

I'm having a similar issue when I try to run a jupyter notebook. My error is:
StdErr from ShellExec, This program is blocked by group policy. For more information, contact your system administrator. This program is blocked by group policy. For more information, contact your system administrator. for C:/Users/142522/AppLockerExceptions/Anaconda3/Scripts/activate && conda activate base && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:\Users\142522\.vscode\extensions\ms-python.python-2020.11.371526539\pythonFiles\pyvsc-run-isolated.py c:/Users/142522/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/printEnvVariables.py

I get this error when I try to run bash files through cmd. So I need to do all of my python stuff through the powershell, where I can set the argument to bypass the execution policy. I have set that as the default terminal in my settings.json:
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "terminal.integrated.shellArgs.windows": [ "-NoExit", "-ExecutionPolicy", "ByPass", "-Command", "& 'C:\\Users\\142522\\AppLockerExceptions\\Anaconda3\\shell\\condabin\\conda-hook.ps1' ; conda activate 'C:\\Users\\142522\\AppLockerExceptions\\Anaconda3'" ], "python.terminal.activateEnvironment": false,
and everything works fine when I run a terminal in vscode, however, when I try to run a jupyter notebook, it doesn't seem to be using the powershell shell to initialise the kernel.

  • VS Code:
    Version: 1.51.1 (user setup)
    Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
    Date: 2020-11-10T23:34:32.027Z
    Electron: 9.3.3
    Chrome: 83.0.4103.122
    Node.js: 12.14.1
    V8: 8.3.110.13-electron.0
    OS: Windows_NT x64 10.0.18362
  • Extensions:
    gitlens 11.0.6
    latex-workshop 8.15.0
    git-graph 1.28.0
    python 2020.11.371526539
    jupyter 2020.12.411183155
  • Anaconda: custom py38_1, Python: 3.8.5
  • Virtual environment: conda?
  • Jupyter server running: local

@paulacamargo25
Copy link

Thanks for the bug report! We just wanted to quickly acknowledge we received it and we will triage this as soon as we can.

@paulacamargo25
Copy link

This is a duplicated issue in 15594. And it is already solved.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

6 participants