command python.xxx not found in workspaces without folders
See original GitHub issueEnvironment data
- VS Code version: 1.28.1-1539281690
- Extension version (available under the Extensions sidebar): 2018.9.0
- OS and version: Linux Mint 19 x64
- Python version (& distribution if applicable, e.g. Anaconda): 3.6.6
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Relevant/affected Python packages and their versions: N/A
Actual behavior
When working in a workspace that has no associated folder, nearly all python.xxx commands fail with a “not found” error. The only exception seems to be python.setInterpreter, which works fine.
When the window is not part of a workspace or when adding a folder to the workspace, the extension instantly resumes full functionality.
Expected behavior
The extension used to work fine with workspaces that have no associated folders.
Steps to reproduce:
- Install the extension, if necessary
- File > New Window
- File > Save Workspace As
- View > Command Palette, try to run any Python command other than Select Interpreter and see it fail
- File > Add Folder to Workspace
- Try step 3 again and see it succeed
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
n/a
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
Error: command 'python.setLinter' not found
at t._tryExecuteCommand (/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:3030)
at /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:3029
at n.Class.derive._oncancel.then (/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:167)
at t.executeCommand (/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:3029)
at t.run (/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1366)
at t.run (/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1367)
at /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:3015
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
ModuleNotFoundError: No module named XXX - Stack Overflow
According to me you are getting directory related issues. Try placing the necessary files in a same directory.
Read more >Installation troubleshooting — ROS 2 Documentation: Humble ...
Sometimes rclpy fails to be imported because the expected C extension libraries are not found. If so, compare the libraries present in the...
Read more >cargo-make | Rust task runner and build tool.
Overview. The cargo-make task runner enables to define and configure sets of tasks and run them as a flow. A task is a...
Read more >I'm getting storage errors when running flows from ...
I'm getting storage errors when running flows from deployments using DockerFlowRunner (FileNotFoundError: [Errno 2] No such file or directory: ' ...
Read more >Developing Python Web Applications with Flask
There are many Python frameworks available, e.g., full-stack frameworks like Djiango, ... x.x.x/pysrc ... Also there is no need to use the export...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Didn’t realize this one was still open, I believe this was fixed a while ago actually.
Ah good. In that case I added a PR that fixes it on my end @DonJayamanne . Disclaimer: I know nothing about your code base, additional changes may be required elsewhere.