Skip to main content

All Questions

Tagged with
-6 votes
0 answers
36 views

having two unfinished tests in Freecodecamps Budget App project [closed]

class Category: def __init__(self, name): self.name = name self.ledger = [] def deposit(self, amount, description=""): self.ledger.append({"amount":...
Yoofi T's user avatar
-2 votes
0 answers
36 views

Can I get the Python interpreter to print stack traces with one line per frame rather than two?

When an exception is raised in Python, we get something like: Location source line Location source line Location source line yet - I would rather have one line per "stack frame", e.g.:...
einpoklum's user avatar
  • 133k
0 votes
1 answer
46 views

Debugging scipy.minimize

I am trying to "minimize" using SLSQP in scipy module. With a lot of difficulty, I am trying to implement some constraints. I am encountering some strange error, thus unable to debug. My ...
Murali's user avatar
  • 21
2 votes
0 answers
41 views

Why does VS Code Debugger reset `PATH` from `.env`, breaking subprocess behavior in debug mode only?

I'm facing an unusual issue when using subprocess.Popen in Python while debugging in VS Code. The behavior of the PATH environment variable changes only in debug mode, and subprocess calls behave ...
KLc3088's user avatar
  • 167
1 vote
0 answers
49 views

VS Code Python: Script runs with "Run" but fails with "Debug" when using symlinked python.exe

Background: I'm facing an issue in VS Code where my Python script runs fine using the "Run" button but fails silently when using "Debug". Environment: Windows 10 Python 3.10 VS ...
KLc3088's user avatar
  • 167
3 votes
1 answer
80 views

PowerShell Subprocess Launched via debugpy Doesn’t Inherit Environment Variables (but cmd.exe does)

Problem I'm encountering an issue where launching PowerShell via Python’s subprocess.Popen() works as expected during normal execution, but in debug mode (using debugpy/cursor) key environment ...
KLc3088's user avatar
  • 167
0 votes
0 answers
47 views

Bug related with circular imports using Flask

So i have some flask code, two files affected one is flask_app.py and the other one is routes.py. The error thrown were ranging from Error running WSGI application 2025-03-16 23:05:30,980: ...
Vikt Vik's user avatar
0 votes
0 answers
27 views

Can't edit cwd in VS Code Python Debug

I was trying for long time, read a lot of forums but I couldn't find the solution. I want to debug a function inside an Python file, the function refers to some local files with specific path, and I ...
MHH's user avatar
  • 1
-2 votes
1 answer
98 views

pipreqs fails with SyntaxError when scanning Python 2 code in a Python 3 environment

I am doing a Python environment setup practice in which given the code(cannot modify), I need to generate a requirements.txt and install the packages to pass the tests. I am in a python3.6 virtual ...
J X's user avatar
  • 1
0 votes
0 answers
92 views

In a uv-created venv, the VS Code Integrated Debugger is not activating when clicking "Debug Test" from VS Code Integrated Testing

I am migrating a Django project from Pipenv to uv. My development environment is a VS Code Dev Container. Everything worked as expected when using Pipenv. I have a problem where the integrated ...
Bob Tanner's user avatar
-1 votes
0 answers
40 views

Container (Apptainer) as interpreter in VSCode

I want to use my apptainer container as Python interpreter for VS Code. I have this bash script saved (named "python"): #!/bin/bash # load required modules ... apptainer exec my_image.sif /...
Jannik Schneider's user avatar
0 votes
1 answer
64 views

What is the advantage of debugging using launch.json in VS Code in particular with Python?

I am trying to set up VS Code for my Python programming. Although I can debug without the launch.json, I wanted to know what are the advantages I am missing. Also I saw that a lot of questions around ...
Mr Thomas Anderson's user avatar
-2 votes
0 answers
58 views

Weird Behavior of np.loadtxt()

I'm currently reading a neural network project using debug tool in VScode. There is a function def load_img_name_list(dataset_path): img_name_list = np.loadtxt(dataset_path, dtype=np.int32) ...
HiiiQwQ's user avatar
1 vote
4 answers
333 views

Is it possible to turn off printing the id (hex address) globally for Python objects?

When you don't provide a __repr__ or __str__ method on a custom class, you just get a classname and the Python address of the object (or, to be more specific, what id(self) would return. This is fine ...
JL Peyret's user avatar
  • 12.1k
1 vote
0 answers
65 views

VS Code Python Debugger fails du to incorrect command line

I'm trying to use the Python Debugger inside VS Code (for the first time) but it fails at start up. As far as I can tell, the command line used by VS Code is incorrect and I need help to fix that. ...
t34hansen's user avatar

15 30 50 per page
1
2 3 4 5
248