microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.32k stars 1.18k forks source link

[Remote-SSH Bug]: junk files whose names start with tmp are sometimes generated in working directory #20486

Closed guzy0324 closed 1 year ago

guzy0324 commented 1 year ago

Is there an existing issue for this bug?

Debugging Steps

->

I can connect to the the remote ssh server, but sometimes junk files whose names start with tmp are generated in my working directory. For example, a file named tmp1otmzfm9 contains the following contents.

eval "$(/mdata/guzy0324/anaconda3/bin/conda shell.posix hook)"
conda activate  /mdata/guzy0324/anaconda3/envs/qd
python /mdata/guzy0324/.vscode-server/extensions/ms-python.python-2022.20.1/pythonFiles/get_output_via_markers.py /mdata/guzy0324/.vscode-server/extensions/ms-python.python-2022.20.1/pythonFiles/linter.py -m pylint --errors-only '--generated-members=numpy.* ,torch.* ,cv2.* , cv.*' /mdata/guzy0324/codes/QD/DPR_scripts/span_logits_viz.py

I have no idea why and when they were generated. Maybe they should be cleared automatically, but the cleaner didn't work as expected?

Versions

Expected Behavior

No response

Steps To Reproduce

No response

Remote-SSH Log

Remote-SSH Log

``` [15:33:08.800] Log Level: 2 [15:33:09.170] remote-ssh@0.94.0 [15:33:09.170] win32 x64 [15:33:09.634] SSH Resolver called for "ssh-remote+labgpu", attempt 1 [15:33:09.640] "remote.SSH.useLocalServer": false [15:33:09.646] "remote.SSH.showLoginTerminal": false [15:33:09.648] "remote.SSH.remotePlatform": {"lab":"linux","matpool":"linux","labgpu":"linux","autodl":"linux","labgpu54":"linux"} [15:33:09.648] "remote.SSH.path": undefined [15:33:09.650] "remote.SSH.configFile": undefined [15:33:09.652] "remote.SSH.useFlock": true [15:33:09.654] "remote.SSH.lockfilesInTmp": false [15:33:09.656] "remote.SSH.localServerDownload": auto [15:33:09.656] "remote.SSH.remoteServerListenOnSocket": false [15:33:09.657] "remote.SSH.showLoginTerminal": false [15:33:09.659] "remote.SSH.defaultExtensions": [] [15:33:09.661] "remote.SSH.loglevel": 2 [15:33:09.663] "remote.SSH.enableDynamicForwarding": true [15:33:09.665] "remote.SSH.enableRemoteCommand": false [15:33:09.665] "remote.SSH.serverPickPortsFromRange": {} [15:33:09.666] "remote.SSH.serverInstallPath": {} [15:33:09.696] SSH Resolver called for host: labgpu [15:33:09.697] Setting up SSH remote "labgpu" [15:33:09.733] Using commit id "e8a3071ea4344d9d48ef8a4df2c097372b0c5161" and quality "stable" for server [15:33:09.771] Install and start server if needed [15:33:09.787] Checking ssh with "ssh -V" [15:33:09.985] > OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3 [15:33:10.010] Running script with connection command: ssh -T -D 52968 labgpu bash [15:33:10.027] Terminal shell path: C:\WINDOWS\System32\cmd.exe [15:33:17.190] > f74f8cf3a84b: running > ]0;C:\WINDOWS\System32\cmd.exebash: line 199: cannot create temp file for here-document: No space left on device > Missing GLIBCXX >= 3.4.18! > Found versions 3.4.1 > 3.4.2 > 3.4.3 > 3.4.4 > 3.4.5 > 3.4.6 > 3.4.7 > 3.4.8 > 3.4.9 > 3.4.10 > 3.4.11 > 3.4.12 > 3.4.13 > 3.4.14 > 3.4.15 > 3.4.16 > 3.4.17 > 3.4.18 > 3.4.19 > 3.4.20 > 3.4.21 > 3.4.22 > 3.4.23 > 3.4.24 > 3.4.25 > 3.4.26 > 3.4.27 > 3.4.28 > f74f8cf3a84b$$1$$ > Acquiring lock on /mdata/guzy0324/.vscode-server/bin/e8a3071ea4344d9d48ef8a4df2c > c097372b0c5161/vscode-remote-lock.guzy0324.e8a3071ea4344d9d48ef8a4df2c097372b0c51 > 161 > Found existing installation at /mdata/guzy0324/.vscode-server/bin/e8a3071ea4344d > d9d48ef8a4df2c097372b0c5161... > Checking /mdata/guzy0324/.vscode-server/.e8a3071ea4344d9d48ef8a4df2c097372b0c516 > 61.log and /mdata/guzy0324/.vscode-server/.e8a3071ea4344d9d48ef8a4df2c097372b0c51 > 161.pid for a running server > Looking for server with pid: 2006821 [15:33:17.192] Got some output, clearing connection timeout [15:33:17.210] > Running ssh connection command... /mdata/guzy0324/.vscode-server/bin/e8a3071ea43 > 344d9d48ef8a4df2c097372b0c5161/bin/code-server --start-server --host=127.0.0.1 -- > -accept-server-license-terms --enable-remote-auto-shutdown --port=0 --telemetry-l > level all &> "/mdata/guzy0324/.vscode-server/.e8a3071ea4344d9d48ef8a4df2c097372 > 2b0c5161.log" < /dev/null > printenv: > SHELL=/bin/zsh > LC_ADDRESS=zh_CN.UTF-8 > LC_NAME=zh_CN.UTF-8 > LC_MONETARY=zh_CN.UTF-8 > PWD=/mdata/guzy0324 > LOGNAME=guzy0324 > XDG_SESSION_TYPE=tty > MOTD_SHOWN=pam > HOME=/mdata/guzy0324 > LC_PAPER=zh_CN.UTF-8 > LANG=en_US.UTF-8 > VSCODE_AGENT_FOLDER=/mdata/guzy0324/.vscode-server > SSH_CONNECTION=10.162.169.145 52976 10.176.64.68 22 > XDG_SESSION_CLASS=user > LC_IDENTIFICATION=zh_CN.UTF-8 > USER=guzy0324 > SHLVL=0 > LC_TELEPHONE=zh_CN.UTF-8 > LC_MEASUREMENT=zh_CN.UTF-8 > XDG_SESSION_ID=917 > XDG_RUNTIME_DIR=/run/user/1007 > SSH_CLIENT=10.162.169.145 52976 22 > LC_TIME=zh_CN.UTF-8 > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games > s:/usr/local/games > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1007/bus > LC_NUMERIC=zh_CN.UTF-8 > OLDPWD=/mdata/guzy0324 > _=/usr/bin/printenv > Removing old logfile at /mdata/guzy0324/.vscode-server/.e8a3071ea4344d9d48ef8a4d > df2c097372b0c5161.log > Spawned remote server: 2091247 > Waiting for server log... > > * > * Visual Studio Code Server > * > * By using the software, you agree to > * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-lice > ense) and > * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacyst > tatement). > * > > f74f8cf3a84b: start > SSH_AUTH_SOCK==== > DISPLAY==== > webUiAccessToken==== > listeningOn==41225== > osReleaseId==ubuntu== > arch==x86_64== > tmpDir==/run/user/1007== > platform==linux== > unpackResult==== > didLocalDownload==0== > downloadTime==== > installTime==== > extInstallTime==== > serverStartTime==43== > connectionToken==11a1a111-1111-1111-a111-1a1111aa1a11== > f74f8cf3a84b: end [15:33:17.213] Received install output: SSH_AUTH_SOCK==== DISPLAY==== webUiAccessToken==== listeningOn==41225== osReleaseId==ubuntu== arch==x86_64== tmpDir==/run/user/1007== platform==linux== unpackResult==== didLocalDownload==0== downloadTime==== installTime==== extInstallTime==== serverStartTime==43== connectionToken==11a1a111-1111-1111-a111-1a1111aa1a11== [15:33:17.215] Remote server is listening on 41225 [15:33:17.215] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":41225},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/1007","platform":"linux","connectionToken":"11a1a111-1111-1111-a111-1a1111aa1a11"},"serverStartTime":43,"installUnpackCode":""} [15:33:17.232] Starting forwarding server. localPort 52977 -> socksPort 52968 -> remotePort 41225 [15:33:17.239] Forwarding server listening on 52977 [15:33:17.240] Waiting for ssh tunnel to be ready [15:33:17.247] [Forwarding server 52977] Got connection 0 [15:33:17.256] Tunneled 41225 to local port 52977 [15:33:17.257] Resolved "ssh-remote+labgpu" to "127.0.0.1:52977" [15:33:17.302] ------ [15:33:17.790] [Forwarding server 52977] Got connection 1 [15:33:17.830] [Forwarding server 52977] Got connection 2 [15:33:21.841] [Forwarding server 52977] Got connection 3 [15:33:37.624] [Forwarding server 52977] Got connection 4 [19:24:38.410] > client > t_loop: send disconnect: Connection reset [19:24:38.417] > [19:24:39.714] "install" terminal command done [19:24:39.714] Install terminal quit with output: t_loop: send disconnect: Connection reset [19:24:55.062] [Forwarding server 52977] Got connection 5 [19:24:55.063] Failed to set up socket for dynamic port forward to remote port 41225: connect ECONNREFUSED 127.0.0.1:52968. Is the remote port correct? [19:24:55.073] ------ [19:24:55.073] SSH Resolver called for "ssh-remote+labgpu", attempt 2, (Reconnection) [19:24:55.075] SSH Resolver called for host: labgpu [19:24:55.075] Setting up SSH remote "labgpu" [19:24:55.078] Using commit id "e8a3071ea4344d9d48ef8a4df2c097372b0c5161" and quality "stable" for server [19:24:55.081] Install and start server if needed [19:24:55.085] Running script with connection command: ssh -T -D 57954 labgpu bash [19:24:55.087] Terminal shell path: C:\WINDOWS\System32\cmd.exe [19:24:55.726] > 4517061a4836: running > bash: line 199: cannot create temp file for here-document: No space left on device > Missing GLIBCXX >= 3.4.18! > Found versions 3.4.1 > 3.4.2 > 3.4.3 > 3.4.4 > 3.4.5 > 3.4.6 > 3.4.7 > 3.4.8 > 3.4.9 > 3.4.10 > 3.4.11 > 3.4.12 > 3.4.13 > 3.4.14 > 3.4.15 > 3.4.16 > 3.4.17 > 3.4.18 > 3.4.19 > 3.4.20 > 3.4.21 > 3.4.22 > 3.4.23 > 3.4.24 > 3.4.25 > 3.4.26]0;C:\WINDOWS\System32\cmd.exe > 3.4.27 > 3.4.28 > 4517061a4836$$1$$ > Acquiring lock on /mdata/guzy0324/.vscode-server/bin/e8a3071ea4344d9d48ef8a4df2c > c097372b0c5161/vscode-remote-lock.guzy0324.e8a3071ea4344d9d48ef8a4df2c097372b0c51 > 161 [19:24:55.727] Got some output, clearing connection timeout [19:24:55.734] > > Found existing installation at /mdata/guzy0324/.vscode-server/bin/e8a3071ea4344d > d9d48ef8a4df2c097372b0c5161... > Checking /mdata/guzy0324/.vscode-server/.e8a3071ea4344d9d48ef8a4df2c097372b0c516 > 61.log and /mdata/guzy0324/.vscode-server/.e8a3071ea4344d9d48ef8a4df2c097372b0c51 > 161.pid for a running server [19:24:55.743] > [19:24:55.771] > Looking for server with pid: 2091247 [19:24:55.787] > > Found running server... > > * > * Visual Studio Code Server > * > * By using the software, you agree to > * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-lice > ense) and [19:24:55.792] > > * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacyst > tatement). > * > [19:24:55.804] > [19:24:55.809] > Checking server status on port 41225 with wget [19:24:55.817] > > 4517061a4836: start > SSH_AUTH_SOCK==== > DISPLAY==== > webUiAccessToken==== > listeningOn==41225== > osReleaseId==ubuntu== > arch==x86_64== > tmpDir==/run/user/1007== > platform==linux== > unpackResult==== > didLocalDownload==0== > downloadTime==== > installTime==== > extInstallTime==== > serverStartTime==== > connectionToken==11a1a111-1111-1111-a111-1a1111aa1a11== > 4517061a4836: end [19:24:55.817] Received install output: SSH_AUTH_SOCK==== DISPLAY==== webUiAccessToken==== listeningOn==41225== osReleaseId==ubuntu== arch==x86_64== tmpDir==/run/user/1007== platform==linux== unpackResult==== didLocalDownload==0== downloadTime==== installTime==== extInstallTime==== serverStartTime==== connectionToken==11a1a111-1111-1111-a111-1a1111aa1a11== [19:24:55.818] Remote server is listening on 41225 [19:24:55.818] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":41225},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/1007","platform":"linux","connectionToken":"11a1a111-1111-1111-a111-1a1111aa1a11"},"installUnpackCode":""} [19:24:55.820] Starting forwarding server. localPort 57959 -> socksPort 57954 -> remotePort 41225 [19:24:55.820] Forwarding server listening on 57959 [19:24:55.821] Waiting for ssh tunnel to be ready [19:24:55.821] [Forwarding server 57959] Got connection 0 [19:24:55.822] Tunneled 41225 to local port 57959 [19:24:55.822] Resolved "ssh-remote+labgpu" to "127.0.0.1:57959" [19:24:55.827] ------ [19:24:55.838] [Forwarding server 57959] Got connection 1 [19:25:30.105] [Forwarding server 57959] Got connection 2 [19:42:10.780] [Forwarding server 57959] Got connection 3 ```

Anything else?

No response

karrtikr commented 1 year ago

Please provide the logs as mentioned in the issue template. Set python.logging.level to debug in User settings, reload window, then perform the steps to reproduce before providing the logs.

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

``` XXX ```

guzy0324 commented 1 year ago
[DEBUG 2023-0-15 1:16:45.695]: Found cached env for /mdata/guzy0324/anaconda3/envs/qd/bin/python
[DEBUG 2023-0-15 1:16:45.697]: Resolved /mdata/guzy0324/anaconda3/envs/qd/bin/python from cache: {"name":"qd","location":"/mdata/guzy0324/anaconda3/envs/qd","kind":"virt-conda","executable":{"filename":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","sysPrefix":"/mdata/guzy0324/anaconda3/envs/qd","ctime":1671809895003,"mtime":1671809895003},"display":"Python 3.8.15 ('qd')","version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 15:19:38) \n[GCC 11.2.0]"},"arch":3,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","detailedDisplayName":"Python 3.8.15 ('qd': conda)"}
[DEBUG 2023-0-15 1:16:45.698]: Cached data exists KeyPrefix=Cache_Method_Output_S.ensureEnvironmentContainsPython-Args="/mdata/guzy0324/anaconda3/envs/qd/bin/python"
[DEBUG 2023-0-15 1:16:48.320]: Testing: Trigger refresh after change in /mdata/guzy0324/codes/QD/DPR_scripts/probe_reader_predictions.py
[DEBUG 2023-0-15 1:16:48.341]: Found cached env for /mdata/guzy0324/anaconda3/envs/qd/bin/python
[DEBUG 2023-0-15 1:16:48.341]: Resolved /mdata/guzy0324/anaconda3/envs/qd/bin/python from cache: {"name":"qd","location":"/mdata/guzy0324/anaconda3/envs/qd","kind":"virt-conda","executable":{"filename":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","sysPrefix":"/mdata/guzy0324/anaconda3/envs/qd","ctime":1671809895003,"mtime":1671809895003},"display":"Python 3.8.15 ('qd')","version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 15:19:38) \n[GCC 11.2.0]"},"arch":3,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","detailedDisplayName":"Python 3.8.15 ('qd': conda)"}
Extension search path: /mdata/guzy0324/.vscode-server/extensions
[DEBUG 2023-0-15 1:16:48.368]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="workspace"-Arg-Separator-"showPylintExtensionPrompt"-Arg-Separator-false
[DEBUG 2023-0-15 1:16:48.368]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"ssh-remote_WORKSPACE_FOLDER_INTERPRETER_PATH_/mdata/guzy0324/codes/QD"-Arg-Separator-undefined
[DEBUG 2023-0-15 1:16:48.368]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"ssh-remote_WORKSPACE_FOLDER_INTERPRETER_PATH_/mdata/guzy0324/codes/QD"-Arg-Separator-undefined
[DEBUG 2023-0-15 1:16:48.370]: Found cached env for /mdata/guzy0324/anaconda3/envs/qd/bin/python
[DEBUG 2023-0-15 1:16:48.370]: Resolved /mdata/guzy0324/anaconda3/envs/qd/bin/python from cache: {"name":"qd","location":"/mdata/guzy0324/anaconda3/envs/qd","kind":"virt-conda","executable":{"filename":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","sysPrefix":"/mdata/guzy0324/anaconda3/envs/qd","ctime":1671809895003,"mtime":1671809895003},"display":"Python 3.8.15 ('qd')","version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 15:19:38) \n[GCC 11.2.0]"},"arch":3,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","detailedDisplayName":"Python 3.8.15 ('qd': conda)"}
[DEBUG 2023-0-15 1:16:48.370]: Cached data exists KeyPrefix=Cache_Method_Output_y.getCondaVersion-Args=
[DEBUG 2023-0-15 1:16:48.370]: Found executable within conda env {"name":"qd","prefix":"/mdata/guzy0324/anaconda3/envs/qd"}
> conda run -n qd --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/linter.py -m pylint --errors-only "--generated-members=numpy.* ,torch.* ,cv2.* , cv.*" ./DPR_scripts/probe_reader_predictions.py
cwd: .
[DEBUG 2023-0-15 1:16:48.571]: Delay Trigger[Refresh Test Data]: triggered=5, called=5
[DEBUG 2023-0-15 1:16:50.476]: Testing: Trigger refresh after change in /mdata/guzy0324/codes/QD/DPR_scripts/probe_reader_predictions.py
[DEBUG 2023-0-15 1:16:50.506]: Found cached env for /mdata/guzy0324/anaconda3/envs/qd/bin/python
[DEBUG 2023-0-15 1:16:50.507]: Resolved /mdata/guzy0324/anaconda3/envs/qd/bin/python from cache: {"name":"qd","location":"/mdata/guzy0324/anaconda3/envs/qd","kind":"virt-conda","executable":{"filename":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","sysPrefix":"/mdata/guzy0324/anaconda3/envs/qd","ctime":1671809895003,"mtime":1671809895003},"display":"Python 3.8.15 ('qd')","version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 15:19:38) \n[GCC 11.2.0]"},"arch":3,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","detailedDisplayName":"Python 3.8.15 ('qd': conda)"}
Extension search path: /mdata/guzy0324/.vscode-server/extensions
[DEBUG 2023-0-15 1:16:50.532]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="workspace"-Arg-Separator-"showPylintExtensionPrompt"-Arg-Separator-false
[DEBUG 2023-0-15 1:16:50.533]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"ssh-remote_WORKSPACE_FOLDER_INTERPRETER_PATH_/mdata/guzy0324/codes/QD"-Arg-Separator-undefined
[DEBUG 2023-0-15 1:16:50.533]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"ssh-remote_WORKSPACE_FOLDER_INTERPRETER_PATH_/mdata/guzy0324/codes/QD"-Arg-Separator-undefined
[DEBUG 2023-0-15 1:16:50.534]: Found cached env for /mdata/guzy0324/anaconda3/envs/qd/bin/python
[DEBUG 2023-0-15 1:16:50.534]: Resolved /mdata/guzy0324/anaconda3/envs/qd/bin/python from cache: {"name":"qd","location":"/mdata/guzy0324/anaconda3/envs/qd","kind":"virt-conda","executable":{"filename":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","sysPrefix":"/mdata/guzy0324/anaconda3/envs/qd","ctime":1671809895003,"mtime":1671809895003},"display":"Python 3.8.15 ('qd')","version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 15:19:38) \n[GCC 11.2.0]"},"arch":3,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","detailedDisplayName":"Python 3.8.15 ('qd': conda)"}
[DEBUG 2023-0-15 1:16:50.534]: Cached data exists KeyPrefix=Cache_Method_Output_y.getCondaVersion-Args=
[DEBUG 2023-0-15 1:16:50.534]: Found executable within conda env {"name":"qd","prefix":"/mdata/guzy0324/anaconda3/envs/qd"}
> conda run -n qd --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.20.2/pythonFiles/linter.py -m pylint --errors-only "--generated-members=numpy.* ,torch.* ,cv2.* , cv.*" ./DPR_scripts/probe_reader_predictions.py
cwd: .
[DEBUG 2023-0-15 1:16:50.727]: Delay Trigger[Refresh Test Data]: triggered=6, called=6
##########Linting Output - pylint##########

[
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 17,
        "column": 0,
        "endLine": 17,
        "endColumn": 52,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.data.qa_validation'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 18,
        "column": 0,
        "endLine": 18,
        "endColumn": 56,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.data.reader_data'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 19,
        "column": 0,
        "endLine": 19,
        "endColumn": 38,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.models'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 20,
        "column": 0,
        "endLine": 20,
        "endColumn": 36,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.options'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 21,
        "column": 0,
        "endLine": 21,
        "endColumn": 35,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.utils.switch'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 155,
        "column": 4,
        "endLine": 155,
        "endColumn": 10,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "no-value-for-parameter",
        "message": "No value for argument 'cfg' in function call",
        "message-id": "E1120"
    }
]
[DEBUG 2023-0-15 1:16:54.425]: Found cached env for /mdata/guzy0324/anaconda3/envs/qd/bin/python
[DEBUG 2023-0-15 1:16:54.433]: Found cached env for /mdata/guzy0324/anaconda3/envs/qd/bin/python
[DEBUG 2023-0-15 1:16:54.434]: Resolved /mdata/guzy0324/anaconda3/envs/qd/bin/python from cache: {"name":"qd","location":"/mdata/guzy0324/anaconda3/envs/qd","kind":"virt-conda","executable":{"filename":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","sysPrefix":"/mdata/guzy0324/anaconda3/envs/qd","ctime":1671809895003,"mtime":1671809895003},"display":"Python 3.8.15 ('qd')","version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 15:19:38) \n[GCC 11.2.0]"},"arch":3,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","detailedDisplayName":"Python 3.8.15 ('qd': conda)"}
[DEBUG 2023-0-15 1:16:54.434]: Resolved /mdata/guzy0324/anaconda3/envs/qd/bin/python from cache: {"name":"qd","location":"/mdata/guzy0324/anaconda3/envs/qd","kind":"virt-conda","executable":{"filename":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","sysPrefix":"/mdata/guzy0324/anaconda3/envs/qd","ctime":1671809895003,"mtime":1671809895003},"display":"Python 3.8.15 ('qd')","version":{"major":3,"minor":8,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"3.8.15 (default, Nov 24 2022, 15:19:38) \n[GCC 11.2.0]"},"arch":3,"distro":{"org":"Anaconda, Inc."},"source":[],"type":"Conda","id":"/mdata/guzy0324/anaconda3/envs/qd/bin/python","detailedDisplayName":"Python 3.8.15 ('qd': conda)"}
[DEBUG 2023-0-15 1:16:54.434]: Cached data exists KeyPrefix=Cache_Method_Output_S.ensureEnvironmentContainsPython-Args="/mdata/guzy0324/anaconda3/envs/qd/bin/python"
##########Linting Output - pylint##########

[
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 17,
        "column": 0,
        "endLine": 17,
        "endColumn": 52,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.data.qa_validation'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 18,
        "column": 0,
        "endLine": 18,
        "endColumn": 56,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.data.reader_data'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 19,
        "column": 0,
        "endLine": 19,
        "endColumn": 38,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.models'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 20,
        "column": 0,
        "endLine": 20,
        "endColumn": 36,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.options'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 21,
        "column": 0,
        "endLine": 21,
        "endColumn": 35,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "import-error",
        "message": "Unable to import 'dpr.utils.switch'",
        "message-id": "E0401"
    },
    {
        "type": "error",
        "module": "probe_reader_predictions",
        "obj": "",
        "line": 154,
        "column": 4,
        "endLine": 154,
        "endColumn": 10,
        "path": "DPR_scripts/probe_reader_predictions.py",
        "symbol": "no-value-for-parameter",
        "message": "No value for argument 'cfg' in function call",
        "message-id": "E1120"
    }
]
guzy0324 commented 1 year ago

Please provide the logs as mentioned in the issue template. Set python.logging.level to debug in User settings, reload window, then perform the steps to reproduce before providing the logs.

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

I find that whenever I edit a python file, a tmp file is generated. And then if I open the Python in the Output panel, the tmp file may be removed sometimes.

karrtikr commented 1 year ago

Can you provide your User settings as well? Try using Python: Report Issue command, and you will find a settings section, please paste that.

guzy0324 commented 1 year ago

Can you provide your User settings as well? Try using Python: Report Issue command, and you will find a settings section, please paste that.

My vscode does not have Python: Report Issue command, but it has Pylance: Report Issue. Can I use Pylance: Report Issue instead?

guzy0324 commented 1 year ago

Can you provide your User settings as well? Try using Python: Report Issue command, and you will find a settings section, please paste that.

By the way, I paste my settings.json here:

{
    "editor.fontFamily": "'SauceCodePro Nerd Font', Consolas, 'Courier New', monospace",
    "workbench.colorTheme": "One Dark Pro",
    "workbench.editor.enablePreview": false, // 解决 VScode 在打开新文件是覆盖上一个窗口的问题
    "editor.mouseWheelZoom": true,
    "editor.fontSize": 16,
    "editor.detectIndentation": false, // 解决 VScode 根据项目自动设置tab大小,覆盖默认配置的问题
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "editor.accessibilitySupport": "off",
    //shell
    "terminal.integrated.shellIntegration.enabled": false, // 解决 VScode-remote 多用户使用打开zsh时用的配置文件不是~ https://github.com/microsoft/vscode/issues/157611
    //python设置
    "python.defaultInterpreterPath": "python",
    "files.autoGuessEncoding": true,
    // "editor.renderControlCharacters": false,
    "python.linting.pylintEnabled": true,
    "python.linting.enabled": true,
    "python.linting.pylintArgs": [
        "--errors-only",
        "--generated-members=numpy.* ,torch.* ,cv2.* , cv.*"
    ],
    "python.formatting.provider": "yapf",
    "python.formatting.yapfArgs": [
        "--style",
        "${workspaceFolder}/yapf_style.cfg",
    ],
    "python.languageServer": "Pylance",
    //C/C++设置
    // "files.defaultLanguage": "cpp", // ctrl+N新建文件后默认的语言
    "editor.formatOnType": true, // 输入时就进行格式化,默认触发字符较少,分号可以触发
    "editor.snippetSuggestions": "top", // snippets代码优先显示补全
    "C_Cpp.default.cStandard": "c11",
    "C_Cpp.default.cppStandard": "c++17",
    "C_Cpp.default.includePath": [],
    "C_Cpp.default.compilerPath": "clang++",
    //"C_Cpp.default.compileCommands" : , 
    "C_Cpp.clang_format_sortIncludes": true, // 格式化时调整include的顺序(按字母排序)
    "C_Cpp.intelliSenseEngine": "default", // 可以为Default或Tag Parser,后者较老,功能较简单。具体差别参考cpptools扩展文档
    "C_Cpp.errorSquiggles": "disabled", // 因为有clang的lint,所以关掉
    "C_Cpp.autocomplete": "disabled", // 因为有clang的补全,所以关掉
    "C_Cpp.clang_format_path": "clang-format", // 格式化代码,快捷键 Alt+Shift+f
    "C_Cpp.default.intelliSenseMode": "clang-x64", // 效果效果比 cpptools 要好
    // C/C++ Clang Command Adapter设置
    "clang.cflags": [ // 控制c语言静态检测的参数
        "-std=c11",
        "-w"
    ],
    "clang.cxxflags": [ // 控制c++静态检测时的参数
        "-std=c++17",
        "-w"
    ],
    "clang.completion.enable": true,
    "[cpp]": {
        "editor.defaultFormatter": "ms-vscode.cpptools"
    },
    //vim
    "vim.insertModeKeyBindings": [
        {
            "before": [
                "j",
                "k"
            ],
            "after": [
                "<ESC>"
            ]
        },
    ],
    "vim.easymotion": true,
    // vscode-pandoc
    "pandoc.pdfOptString": "--pdf-engine=xelatex --number-sections --toc -V CJKmainfont=\"Microsoft YaHei\" -V colorlinks=true -V geometry:margin=2cm",
    //marp
    "markdown.marp.breaks": "inherit",
    "markdown.marp.chromePath": "msedge",
    "markdown.marp.enableHtml": true,
    "markdown.marp.exportType": "html",
    "markdown.marp.pdf.noteAnnotations": true,
    //SSH
    "remote.SSH.remotePlatform": {
        "lab": "linux",
        "matpool": "linux",
        "labgpu": "linux",
        "autodl": "linux",
        "labgpu54": "linux"
    },
    //git
    "git.autofetch": true,
    //kite
    "kite.showWelcomeNotificationOnStartup": false,
    //background设置
    "background.useDefault": false,
    "background.customImages": [
        "file:///C:/Users/guzy0/Pictures/Camera Roll/vscode/background0.png",
        "file:///C:/Users/guzy0/Pictures/Camera Roll/vscode/background1.png",
    ],
    "background.styles": [
        {
            "background-size": "24%",
            "background-position": "100% 100%",
            "opacity": 0.324,
            "background-repeat": "no-repeat",
        },
        {
            "background-size": "32%",
            "background-position": "100% 100%",
            "opacity": 0.324,
            "background-repeat": "no-repeat",
        },
    ],
    //yaml
    "redhat.telemetry.enabled": true,
    //copilot
    "editor.inlineSuggest.enabled": true,
    "github.copilot.enable": {
        "*": true,
        "yaml": false,
        "plaintext": false,
        "markdown": true
    },
    //zen mode
    "zenMode.centerLayout": false,
    "zenMode.hideLineNumbers": false,
    "zenMode.hideStatusBar": false,
    "zenMode.hideTabs": false,
}
karrtikr commented 1 year ago

@guzy0324 I suspect it's some formatter or linter which is creating the file, please try removing those settings to disable those and see if the issue happens.

My vscode does not have Python: Report Issue command, but it has Pylance: Report Issue. Can I use Pylance: Report Issue instead?

Open a Python file to activate the extension, and then try searching for the command.

guzy0324 commented 1 year ago

@guzy0324 I suspect it's some formatter or linter which is creating the file, please try removing those settings to disable those and see if the issue happens.

My vscode does not have Python: Report Issue command, but it has Pylance: Report Issue. Can I use Pylance: Report Issue instead?

Open a Python file to activate the extension, and then try searching for the command.

When I disable the python.linting.pylintEnabled, it stops to generate these junk files.

guzy0324 commented 1 year ago

@guzy0324 I suspect it's some formatter or linter which is creating the file, please try removing those settings to disable those and see if the issue happens.

My vscode does not have Python: Report Issue command, but it has Pylance: Report Issue. Can I use Pylance: Report Issue instead?

Open a Python file to activate the extension, and then try searching for the command.

Given these two discussions 1 and 2 it seems like pylance covers most of the features that pylint supports, so I will disable pylint forever. Thank you for your debugging.