Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
81 views

I'm having issues with getting VS Code to integrate Pytest discovery, where it just hangs indefinitely on discovering tests for the workspace. I've tried about every solution, and I have a minimal ...
mightyandweakcoder's user avatar
3 votes
2 answers
221 views

I generally just run my Python code line-by-line using the Python Smart Send feature on VSCode, but after I was away from work for a bit, it suddenly stopped working. Normally Shift + Enter or Right ...
Dillon H's user avatar
0 votes
0 answers
112 views

Pausing or adding new breakpoints halfway during debugging in VSCode seems to make the Python Exception uncaught. The following is a minimal example to reproduce my problem. import contextlib, signal ...
hellohawaii's user avatar
  • 3,084
1 vote
1 answer
92 views

I have multiple Python Paths to choose from as seen in the images. I remember installing Python via brew and through the internet and Anaconda. I don't have any idea which are redundant and what to ...
Vale's user avatar
  • 33
0 votes
0 answers
91 views

I've recently updated vscode to the most recent version, and whenever I open up a new shell or cmd it activates the venv in that directory, and that's fine and expected as before. But now it doesn't ...
Mohamed Hany's user avatar
1 vote
1 answer
77 views

Executing vscode.executeDocumentSymbolProvider gives me all symbols in the file. Can I somehow get name of the function that the cursor is currently in?
mike27's user avatar
  • 1,151
0 votes
1 answer
58 views

Had an issue start with VSCode the last week or so, and not sure if there's just something wrong with my system, my vscode config, or if there's just a vscode bug. To start, I'm running on OSx Sequoia ...
Kyle Jastrick's user avatar
0 votes
0 answers
33 views

Given I have stored my git repos at ~/git/project1, ~/git/groupA/foo, etc. When I open the root directory ~/git with VSCode and refactor code via "rename symbol" or "rename file", ...
gebbissimo's user avatar
  • 2,759
-1 votes
1 answer
88 views

I am trying to use sqlfluff linter, which is a SQL formatter and linter. In settings.json I have, among others, this: "[sql]": { "editor.defaultFormatter": &...
Nir's user avatar
  • 2,677
1 vote
0 answers
34 views

I have a big repo of python snippets. pyright goes crazy because I have a bunch of little folders with scripts. I don't want to have a manually turn it on/off or open specific folders as projects. I ...
red888's user avatar
  • 32.3k
0 votes
0 answers
48 views

Let's assume we have this python script, set breakpoint on second line and start debugging: print(1) print(2) # set breakpoint here print(3) print(4) print(5) Debugger stops here: Now delete the ...
Kossak's user avatar
  • 1,458
0 votes
1 answer
592 views

I've added several custom virtual environments to vscode, so that when I use the command palette I can select from a variety of builtin ones, as well as my own. I'd like to remove some of these, but I ...
Zachary Turner's user avatar
2 votes
1 answer
307 views

I have a python virtual environment in /Documents and a project in /Documents/Code/Python/example. I want to use this venv in my project but I can't get the vs code python interpreter to recognize ...
user24882481's user avatar
1 vote
0 answers
82 views

I receive PylintW0212:protected-access warnings when accessing functions of a module that are prefixed with a single underscore: import my_module my_module._function() # Pylint warning here The ...
user22524802's user avatar
1 vote
1 answer
229 views

Somehow I got myself into a state where python is complaining about PYTHONSTARTUP pointing to a non-existant path. From the terminal tab: % python Python 3.11.8 (v3.11.8:db85d51d3e, Feb 6 2024, 18:...
Roy Smith's user avatar
  • 2,177
2 votes
1 answer
1k views

I have setup my pytest testing to use optional command line arguments. I would like to run and debug these tests in VS Code. However, I am unable to get the command line arguments to work with VS Code....
Matt S's user avatar
  • 67
0 votes
0 answers
116 views

I'm trying to make a subclass with a @classmethod that would take as arguments an instance of its superclass and kwargs for its other fields. The goal is to be able to take an object of the general ...
Patrik Drozdík's user avatar
0 votes
2 answers
1k views

My VS Code is appending the miniconda3 path to the Power Shell prompt every time I execute any code. This causes the PS prompt to be super long. e.g. PS C:\Users\name\Projects\Python Tutorials> **&...
Wyatt_Earp's user avatar
1 vote
1 answer
642 views

In past i always made functions that get a type/class as argument and create an instance of that type, returning the instance. E.g: def CreateWidget(self, widgetType, show = True, name = '', x = 0,...
IkarusDeveloper's user avatar
1 vote
3 answers
4k views

As I am following online course and working on python topics, there is a moment when I write short lines of coding and than another coding all in the same page. Even though I separate them with # ...
pomza's user avatar
  • 11
0 votes
1 answer
138 views

In the VSCode Python debugger, I can right-click on numpy array or pandas DataFrame and select "View Value in Data Viewer". Is it possible to support this for a self-implemented class? I ...
Oblomov's user avatar
  • 125
20 votes
10 answers
12k views

I'm using .env in a Python project, with python-dotenv, but it seems like VSCode automatically loads the environment variables from the .env. Unfortunately, VSCode does not seem to update the ...
Bharel's user avatar
  • 27.5k
-1 votes
1 answer
180 views

In vscode, I am quite confused where to change settings and where to find them. There seems at least two places: Settings and Command Palette. For a specific example, I am using vscode for Python. I ...
oldpride's user avatar
  • 1,063
0 votes
1 answer
168 views

I am working on a Mixed Interger Linear Programming problem. I wanted to use SCIP solver to find the optimised solution for my problem. I was trying to install "PySCIPOpt" package in vscode ...
Hema Sadhasivan's user avatar
0 votes
0 answers
76 views

In VSCode Portable, is there a method/setting to disable automatic expansion of folded functions (or other types of foldable blocks, I guess) on start-up? That is, if I fold a function block, close ...
silence_of_the_lambdas's user avatar
-2 votes
1 answer
2k views

This extension is deprecated as it is no longer being maintained Why is this message showing? Is it a problem? If so, how can fix it?
Abu Taher's user avatar
1 vote
0 answers
671 views

Since few days I have an issue with reloading when debugging flask apps. Usually, when saving changes the debugger restarts and I could work on my app. Now it still saves and reloads, but throws an ...
Joe Platano's user avatar
0 votes
0 answers
932 views

I have a Python virtual environment (venv) with several external libraries/packages installed, such as torch, gradio, and HuggingFace's transformers. I use the interpreter inside the venv to indicate ...
Vu Nguyen's user avatar
0 votes
1 answer
57 views

for i in range(1,5): print(i) a = input("Enter a Number") If I don't Enter anything into the Input and Rerun the File again In VSCODE Terminal, The For loop iteration is advancing. ...
Shivansh Arora's user avatar
12 votes
1 answer
2k views

I'm writing Python code in VS Code and have recently installed the Ruff linter and its associated VS Code extension. One thing I'm finding frustrating is that when I write a symbol name and want to ...
danvk's user avatar
  • 17.2k
14 votes
1 answer
3k views

Recently, code analysis tools like PyCharm and Pylance in VSCode are not picking up packages installed in editable mode (pip install -e <package_name>). This made it so I could not navigate to ...
ini's user avatar
  • 713
0 votes
1 answer
933 views

When an attribute is created and hinted, and then used in the same method, the autocomplete doesn't work (only shows python object stuff): But if I try to use the attribute inside another method, the ...
Camilo's user avatar
  • 75
5 votes
3 answers
16k views

When trying to install the Python extension I get the following error: Error while installing 'Python' extension. Please check the [log](command:workbench.action.showWindowLog) for more details. The ...
Eddie Bickel's user avatar
1 vote
2 answers
372 views

The python interpreter that I choose is python 3.7.16(tf:conda )which is set by anaconda. And its path in my computer is F:\anaconda\envs\tf\python.exe. In the user's setting.json , I changed the ...
AugLeo's user avatar
  • 11
6 votes
1 answer
7k views

While working in a multi-project (VSCode would call it multi-root) python repository the VSCode python plugin for testing fails to run all the test when choosing to run all the tests, however running ...
Rijul Gupta's user avatar
  • 1,171
1 vote
2 answers
2k views

ValueError: Pipeline contains no nodes after applying all provided filters src/pipelines/data_processing<br> src/pipelines/data_science<br> src/pipelines/data_project<br> src/...
Eduardo_Eng_Dados's user avatar
3 votes
0 answers
311 views

I am trying to debug an existing set of unit tests that are run with tox. I updated my launch.json file to include the following configuration: { "module": "tox", "...
John's user avatar
  • 75
1 vote
3 answers
836 views

I was trying to make a for loop to sum the integers from 1 to 100 in Python and wrote the code like this : for i in range(1, 101) : sum_list = [] sum_list.append(i) print(sum(sum_list)) ...
Python newbie's user avatar
1 vote
0 answers
373 views

In PyCharm I can hit Ctrl/Cmd + O and it'll give me a modal with all methods I can override. What's the equivalent in VSCode?
Epic Programmer's user avatar
4 votes
0 answers
381 views

I'm running a(n) .ipynb file within VSCode, trying to debug a callback function. No breakpoints within the callback function are hit, although the breakpoint I've set in the main code cell correctly ...
jmk's user avatar
  • 51
10 votes
1 answer
5k views

Pylint gives a warning whenever something like this happens: import typing SEQ_FR = typing.TypeVar("SEQ_FR") #^^^^^ gets underlined with the warning The warning is like this: Type variable ...
TNTzx's user avatar
  • 537
1 vote
1 answer
194 views

class Foo: method_type: type def method(self) -> ???: # code # Example use: class FooStr(Foo): method_type = str foo_str = FooStr().method() # should be str according to ...
TNTzx's user avatar
  • 537
1 vote
1 answer
435 views

In a Python tutorial I'm following, the Python path is linked to the python.pythonPath setting in the settings.json file of Visual Studio Code. However, the python.pythonPath does not exist anymore. I ...
MLEnthusiast's user avatar
5 votes
2 answers
8k views

I have a Python project which uses mypy for type checking. The root of my project contains a setup.py and the package folder rise, along with a virtual environment folder venv. Both my shells and ...
Soren Bjornstad's user avatar
1 vote
1 answer
5k views

Before adding logging to my project, i would see all logs from libraries such as flask in the terminal console. After adding the following, i no longer see these output in the terminal - but they do ...
mike01010's user avatar
  • 6,204
4 votes
1 answer
2k views

I'm working on a python project within a pretty large multi-language mono-repo with VSCode's python tools (pylance). The root of the workspace(/repo) is not the root module of python imports. When ...
Thomas Matecki's user avatar
6 votes
1 answer
4k views

Let's suppose that I have a project with this file structure: project_dir └── src ├── package1 │   └── module1.py └── package2 └── module2.py When I want to use some class from ...
Anton M.'s user avatar
  • 425
1 vote
0 answers
1k views

How to use existing container in VSCode? I have a file called .devcontainer.json. The path is /home/myname/Documents/ABC/.devcontainer. { "name": "Kaggle Dev CPU", "...
Ichsan's user avatar
  • 828
1 vote
0 answers
294 views

I want to search for a function name across all installed packages and also in the packages defined by python.autoComplete.extraPaths vscode setting. Vscode search panel searches only in the current ...
Mohamed's user avatar
  • 115
7 votes
0 answers
948 views

Let's say that you have two windows open in VS Code, one is a Jupyter notebook, and the other is the Python interactive window. Both are running the same kernel. Is there a way to link these two ...
Bill's user avatar
  • 123