Closed ischurov closed 1 year ago
Hello! On activation does your conda environment work fine? Can you do other things with the python interpreter such as run a file? Can you try running just the pytest command (so just python -m pytest
should work) from your integrated terminal on your remote connection? Does this work and what is the outcome? Finally can you attach the value of your python path?
@eleanorjboyd hi! Yes, the interpreter works fine, conda environment activates automatically, and I can run tests from the command line, like that
% python -m unittest test/test_boolean_analysis.py
<Output of my tests skipped>
.
----------------------------------------------------------------------
Ran 10 tests in 70.677s
OK
python
from the conda environment is used:
% which python
/vol/tcm10/ischurov/.conda/envs/latsym2/bin/python
Actually, almost everything works fine, the only problem is that I get that 0/0 passed tests info. However, passing tests are marked as passing (with green checkbox), failed are marked as failed, etc.
@ischurov Can you try the following from a terminal outside of VS Code?
> cd <your project>
> conda activate latsym2
> code .
This should launch in a pre activated terminal, might help with test runner to finish. I am suspecting that conda run
is eventually failing before it can report completed. Also could you provide a screen shot of the tests where the indicator shows 0/0.
@karthiknadig I cannot do that, as I start VSCode in SSH-Remote mode. So it's starting on the server automatically, and I cannot do code .
on the server as it is not installed there (only automatically-installed and automatically-invoked server part is installed). And I do not have the same conda environments locally.
However, it seems that my problem was solved as mysteriously at it appeared: I did nothing, but today everything works as expected. So, I am closing this. Thanks for your help @eleanorjboyd @karthiknadig !
Type: Bug
Behaviour
Expected vs. Actual
I am running Visual Studio Code in SSH-remote mode.
When I am trying to run a test from the Testing panel, it runs (the counter of passed test changes, i.e. 2/15 tests passed, etc., and I see the result in the Python Test Log pane), but finally I get the following error:
No errors are reported above. The indicator of passed test is: 0/0 tests passed.
If I run the failed command manually (I am not sure, whether it makes sense, or this command should be runned only by VSCode), it says the following:
Steps to reproduce:
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)``` Experiment 'pythonaa' is active LSP Notebooks experiment is enabled LSP Notebooks interactive window support is enabled Python interpreter path: /vol/tcm10/ischurov/.conda/envs/latsym2/bin/python > conda info --json > conda config --get auto_activate_base > conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/printEnvVariables.py > /opt/jupyter-conda/bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py > /vol/tcm10/ischurov/.conda/envs/latsym/bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py > ~/.conda/envs/latsym/bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py [ERROR 2023-1-8 14:54:44.272]: Error: Command failed: /home/ischurov/.conda/envs/latsym/bin/python -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py /bin/sh: 1: /home/ischurov/.conda/envs/latsym/bin/python: not found at ChildProcess.exithandler (node:child_process:399:12) at ChildProcess.emit (node:events:526:28) at maybeClose (node:internal/child_process:1092:16) at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe. (node:net:687:12) {
killed: false,
code: 127,
signal: null,
cmd: '/home/ischurov/.conda/envs/latsym/bin/python -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py'
}
> /vol/tcm10/ischurov/.conda/envs/latsym2/bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
> /usr/bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
[ERROR 2023-1-8 14:54:44.342]: Error: Command failed: /usr/bin/python -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
Unknown option: -I
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe. (node:net:687:12) {
killed: false,
code: 2,
signal: null,
cmd: '/usr/bin/python -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py'
}
> /usr/bin/python3 -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
> /usr/include/python3.6 -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
[ERROR 2023-1-8 14:54:44.384]: Error: Command failed: /usr/include/python3.6 -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
/bin/sh: 1: /usr/include/python3.6: Permission denied
at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe. (node:net:687:12) {
killed: false,
code: 126,
signal: null,
cmd: '/usr/include/python3.6 -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py'
}
> ~/.conda/envs/latsym/bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
[ERROR 2023-1-8 14:54:46.292]: Error: Command failed: /home/ischurov/.conda/envs/latsym/bin/python -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
/bin/sh: 1: /home/ischurov/.conda/envs/latsym/bin/python: not found
at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
killed: false,
code: 127,
signal: null,
cmd: '/home/ischurov/.conda/envs/latsym/bin/python -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py'
}
> /usr/bin/python -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
[ERROR 2023-1-8 14:54:46.359]: Error: Command failed: /usr/bin/python -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
Unknown option: -I
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
killed: false,
code: 2,
signal: null,
cmd: '/usr/bin/python -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py'
}
> /usr/include/python3.6 -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
[ERROR 2023-1-8 14:54:46.397]: Error: Command failed: /usr/include/python3.6 -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
/bin/sh: 1: /usr/include/python3.6: Permission denied
at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe. (node:net:687:12) {
killed: false,
code: 126,
signal: null,
cmd: '/usr/include/python3.6 -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py'
}
> -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
[ERROR 2023-1-8 14:54:46.452]: Error: Command failed: -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
/bin/sh: 0: Illegal option -
at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe. (node:net:687:12) {
killed: false,
code: 2,
signal: null,
cmd: '-I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py'
}
[ERROR 2023-1-8 14:54:46.533]: Invalid version for /usr/bin/python: {"name":"","location":"","kind":"global-other","executable":{"filename":"/usr/bin/python","sysPrefix":"","ctime":1567687233384,"mtime":1523889078000},"display":"Python 2.7.x","version":{"major":2,"minor":7,"micro":-1},"arch":1,"distro":{"org":""},"source":["path env var"],"id":"/usr/bin/python","detailedDisplayName":"Python 2.7.x"}
Starting Pylance language server.
Jupyter provided interpreter path override: /vol/tcm10/ischurov/.conda/envs/latsym2/bin/python
> -I ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
[ERROR 2023-1-8 14:54:48.473]: Error: Command failed: -I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py
/bin/sh: 0: Illegal option -
at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe. (node:net:687:12) {
killed: false,
code: 2,
signal: null,
cmd: '-I /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py /home/ischurov/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/interpreterInfo.py'
}
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/testing_tools/unittest_discovery.py ./test test_*.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/testing_tools/unittest_discovery.py ./test test_*.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/visualstudio_py_testlauncher.py --us=./test --up=test_*.py --uvInt=2 --result-port=37253 -ttest_utils.TestHadamardTransform.test_hadamard_transform --testFile=./test/test_utils.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/visualstudio_py_testlauncher.py --us=./test --up=test_*.py --uvInt=2 --result-port=38449 -ttest_parity.TestParity.test_calculate_fourier_transform_matrix -ttest_parity.TestParity.test_parity -ttest_parity.TestParity.test_popcount --testFile=./test/test_parity.py
cwd: .
> conda info --json
Send text to terminal: conda activate latsym2
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/visualstudio_py_testlauncher.py --us=./test --up=test_*.py --uvInt=2 --result-port=34819 -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_cache -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_how_many_terms_to_achieve_score -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_how_many_terms_to_achieve_score2 -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_learn_amplitude -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_learn_value -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_marshall -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_marshall_kagome -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_normalization -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_predict_max_batch_size -ttest_boolean_analysis.TestBooleanFourierAnalyzer.test_symmetries --testFile=./test/test_boolean_analysis.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/visualstudio_py_testlauncher.py --us=./test --up=test_*.py --uvInt=2 --result-port=34347 -ttest_parity.TestParity.test_calculate_fourier_transform_matrix -ttest_parity.TestParity.test_parity -ttest_parity.TestParity.test_popcount --testFile=./test/test_parity.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/visualstudio_py_testlauncher.py --us=./test --up=test_*.py --uvInt=2 --result-port=36661 -ttest_utils.TestHadamardTransform.test_hadamard_transform --testFile=./test/test_utils.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/visualstudio_py_testlauncher.py --us=./test --up=test_*.py --uvInt=2 --result-port=41997 -ttest_fast_boolean_analysis.TestFourierSeries.test_how_many_terms_to_achieve_score -ttest_fast_boolean_analysis.TestFourierSeries.test_how_many_terms_to_achieve_score2 -ttest_fast_boolean_analysis.TestFourierSeries.test_marshall -ttest_fast_boolean_analysis.TestFourierSeries.test_reconstruction -ttest_fast_boolean_analysis.TestTruncateStrategies.test_keep_largest_n --testFile=./test/test_fast_boolean_analysis.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py -m black --line-length 99 --diff --quiet ./test/test_utils.py.f1337cbc100be5adf05a638817b87ebf.tmp
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/testing_tools/unittest_discovery.py ./test test_*.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/visualstudio_py_testlauncher.py --us=./test --up=test_*.py --uvInt=2 --result-port=46679 -ttest_utils.TestHadamardTransform.test_hadamard_transform --testFile=./test/test_utils.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py -m black --line-length 99 --diff --quiet ./test/test_utils.py.f1337cbc100be5adf05a638817b87ebf.tmp
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/visualstudio_py_testlauncher.py --us=./test --up=test_*.py --uvInt=2 --result-port=38155 -ttest_utils.TestHadamardTransform.test_hadamard_transform --testFile=./test/test_utils.py
cwd: .
> conda run -n latsym2 --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/testing_tools/unittest_discovery.py ./test test_*.py
cwd: .
```
User Settings
``` languageServer: "Pylance" formatting • provider: "black" • blackArgs: ""
testing
• unittestArgs: ""
• unittestEnabled: true
```
Extension version: 2023.2.0 VS Code version: Code 1.75.0 (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:24:42.903Z) OS version: Darwin x64 22.1.0 Modes: Sandboxed: No Remote OS version: Linux x64 4.15.0-202-generic Remote OS version: Linux x64 4.15.0-202-generic
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz (8 x 1400)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|5, 6, 7| |Memory (System)|16.00GB (1.48GB free)| |Process Argv|--crash-reporter-id 6268c79f-ba03-42d2-bf4d-cd2dfec6306c| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|SSH: tcm-tunnel| |OS|Linux x64 4.15.0-202-generic| |CPUs|Intel(R) Xeon(R) CPU E5-2683 v4 @ 2.10GHz (32 x 1465)| |Memory (System)|125.82GB (121.56GB free)| |VM|0%| |Item|Value| |---|---| |Remote|SSH: tcm-tunnel| |OS|Linux x64 4.15.0-202-generic| |CPUs|Intel(R) Xeon(R) CPU E5-2683 v4 @ 2.10GHz (32 x 1200)| |Memory (System)|125.82GB (121.56GB free)| |VM|0%|
A/B Experiments
``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 vsccc:30610678 pyindex848:30577860 nodejswelcome1cf:30587006 2e4cg342:30602488 pyind779:30657576 89544117:30613380 pythonsymbol12:30657548 2i9eh265:30646982 ```