Skip to content

Python test shows spinning icon #7898

Closed

Description

Environment data

  • VS Code version: 1.39.0
  • Extension version (available under the Extensions sidebar): 2019.10.41019
  • OS and version: Mac OS 10.14.6
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.1 (Anaconda 4.6.11)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: All
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): No

Expected behaviour

When running a test, I expect to see a spinning icon disappear after the test is completed, to show a green or red icon depending on the result of the text.

Actual behaviour

The spinning icon keeps spinning.

Steps to reproduce:

  1. Within a workspace with python test units, run any test
  2. The spinning icon will start to appear (and in my case will not disappear)
  3. At the same time, the Console shows the error (see also below)
[renderer1] [error] TreeError [CustomView] Data tree node not found: [object Object]: Error: TreeError [CustomView] Data tree node not found: [object Object]

Screen Shot 2019-10-10 at 15 16 02

Logs

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'DebugAdapterFactory - control'
Starting Jedi Python language engine.
> conda --version
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> /Applications/anaconda3/bin/python -c "import sys;print(sys.executable)"
> conda info --json
> conda info --json
> conda info --json
> conda env list
> conda env list
> /Applications/anaconda3/bin/python -c "import sys;print(sys.prefix)"
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -c "import sys;print(sys.prefix)"
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -c "import sys;print(sys.executable)"
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -c "import sys;print(sys.executable)"
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -m site --user-site
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -m site --user-site
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python completion.py
cwd: ~/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles
> /Applications/anaconda3/bin/python completion.py
cwd: ~/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles
> /Applications/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/testing_tools/run_adapter.py discover pytest -- -s --cache-clear xnicer
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -m mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/src/python/xnicer/xnicer/xdeconv/test_em_step.py
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python -m mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/src/python/xnicer/xnicer/xdeconv/test_em_step.py
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/src/python/xnicer/xnicer/xdeconv/test_em_step.py
cwd: ~/src/python/xnicer
##########Linting Output - mypy##########
##########Linting Output - pylint##########
************* Module xnicer.xdeconv.test_em_step
4,0,error,no-name-in-module:No name 'log_likelihoods' in module 'xnicer.xdeconv.em_step'
4,0,error,no-name-in-module:No name 'py_e_single_step' in module 'xnicer.xdeconv.em_step'
4,0,error,no-name-in-module:No name 'em_step' in module 'xnicer.xdeconv.em_step'
5,0,error,no-name-in-module:No name 'FIX_NONE' in module 'xnicer.xdeconv.em_step'
5,0,error,no-name-in-module:No name 'FIX_AMP' in module 'xnicer.xdeconv.em_step'
5,0,error,no-name-in-module:No name 'FIX_MEAN' in module 'xnicer.xdeconv.em_step'
5,0,error,no-name-in-module:No name 'FIX_COVAR' in module 'xnicer.xdeconv.em_step'
5,0,error,no-name-in-module:No name 'FIX_ALL' in module 'xnicer.xdeconv.em_step'
5,0,error,no-name-in-module:No name 'em_step' in module 'xnicer.xdeconv.em_step'
88,4,warning,unused-variable:Unused variable 'r'

------------------------------------------------------------------
Your code has been rated at 8.88/10 (previous run: 8.88/10, +0.00)

> /Applications/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/testing_tools/run_adapter.py discover pytest -- -s --cache-clear xnicer
cwd: ~/src/python/xnicer
> /Applications/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/symbolProvider.py ~/src/python/xnicer/xnicer/xdeconv/test_em_step.py
> conda info --json
> /Applications/anaconda3/bin/python -m pytest --junitxml=/var/folders/_r/flgz8mc97j16zsg6px5s40d00000gn/T/tmp-34883iwBitGeP6ZP.xml ./xnicer/xdeconv/test_em_step.py::test_pyxc_1d
cwd: ~/src/python/xnicer

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

[2019-10-10 14:25:29.550] [renderer1] [error] TreeError [CustomView] Data tree node not found: [object Object]: Error: TreeError [CustomView] Data tree node not found: [object Object]
    at Y.getDataNode (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1045:675)
    at Y.rerender (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1043:295)
    at t.visible.e.map.e (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4974:446)
    at Array.map (<anonymous>)
    at U.doRefresh (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4974:437)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[2019-10-10 14:25:32.066] [renderer1] [error] TreeError [CustomView] Data tree node not found: [object Object]: Error: TreeError [CustomView] Data tree node not found: [object Object]
    at Y.getDataNode (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1045:675)
    at Y.rerender (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1043:295)
    at t.visible.e.map.e (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4974:446)
    at Array.map (<anonymous>)
    at U.doRefresh (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4974:437)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Activity

  1. added
    triage-neededNeeds assignment to the proper sub-team
    bugIssue identified by VS Code Team member as probable bug
    on Oct 10, 2019
  2. astrozot commented on Oct 10, 2019

    @astrozot
    Author

    Quick update: the same bug is present in the insider (daily) version of the Python VSCode extension, used within the insider version of VSCode.

  3. astrozot commented on Oct 10, 2019

    @astrozot
    Author

    Not sure anymore what is happening. Downgrading to the previous version of the Python extension does not solve the issue (which, however, started to appear after the latest update). Downgrading VSCode to the August 2019 version does solve the issue.

  4. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Oct 10, 2019
  5. ericsnowcurrently commented on Oct 10, 2019

    @ericsnowcurrently

    Marco Lombardi (@astrozot), thanks for letting us know about this. At first glance it looks like an incompatibility with changes in the recent release of VS Code. We'll definitely look into that.

    In the meantime, when you downgraded VS Code to the August release, did you still see the problem with the latest release of the Python extension? What about with the insiders build?

  6. 17 remaining items

  7. georgesmith2017 commented on Oct 20, 2019

    @georgesmith2017

    I dug a bit deeper. Tested a class with three tests:

    1. Ran all tests from the very top - the Run All Tests button immediately to the right of the TEST PYTHON caption - all 3 tests were highlighted green as expected
    2. Ran all tests from the python module level, e.g. test_my_file.py - clicked the green arrow Run button - folder, module, test class, and first test nodes were correctly highlighted in green. The remaining two test nodes remained unchanged, with a question mark icon next to them, as if they were never run. Verified the question marked tests were actually run in the Output console tab.
    3. Running all tests from within the class works as expected - all nodes are marked green
    4. Running a single test from within the class produces the already reported spinning icon problem and can be remedied only by restarting VS Code.

    Guys, thanks in advance for working on a fix :)

  8. karthiknadig commented on Oct 23, 2019

    @karthiknadig
    Member

    This is an upstream issue and has to be addressed in VS Code. currently no action on the extension side.

  9. YoDaMa commented on Oct 25, 2019

    @YoDaMa

    Hey Karthik Nadig (@karthiknadig), what's the ETA on the fix on the part of VS Code? I'm inclined to want this to be open, since it is a bug. It should stay open till VS Code fixes it. Currently VSCode is unsuable for debugging pytests, and I've switch to PyCharm for debugging in the interim.

  10. luabud commented on Oct 25, 2019

    @luabud
    Member

    Hey Yoseph Maguire (@YoDaMa), I understand your point of view. The thing is that we have over 1K open issues, so it gets really hard to keep track of what needs to be done and prioritized. That's why we've been closing issues in this repo that are being or will be addressed upstream, just to try to get a manageable backlog of open issues that we can fix in the Python extension. However, I'd like to highlight that this issue is not breaking debugging tests, I believe you're experiencing a different issue.

  11. natemwilson commented on Oct 25, 2019

    @natemwilson

    Luciana Abud (@luabud) or Karthik Nadig (@karthiknadig) can you point us to the relevant issue in the vscode repo?

  12. karthiknadig commented on Oct 25, 2019

    @karthiknadig
    Member
  13. rvanlaar commented on Oct 26, 2019

    @rvanlaar

    The upstream issue seems part of the 2019 October sprint 3.
    In the mean time rolling back to the august release and setting update to 'none' in the settings will let you continue working. https://code.visualstudio.com/updates/v1_38

  14. rvanlaar commented on Oct 27, 2019

    @rvanlaar

    FYI for when VSCode is installed as a package, especially for linux users.

    Setting update to 'None' is not enough.
    The package manager will try to update VScode.
    Here's how to disable the updates for just one package on ubuntu and debian based distros:
    https://askubuntu.com/questions/18654/how-to-prevent-updating-of-a-specific-package

  15. locked as resolved and limited conversation to collaborators on Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions