2,208,574 questions
0
votes
0
answers
26
views
nvim-dap debug using external terminal
I want to launch my debug adapters from an external terminal because I'm sick and tired of always adapting the launch.json or dap-configurations when I could just alter the command directly from the ...
-4
votes
0
answers
42
views
Cannot import process from utils library in Python [closed]
For a computer vision task I came across the need to use the map function.
from utils import process
train_ds = train_ds.map(process)
test_ds = test_ds.map(process)
val_ds = val_ds.map(process)
-----...
Advice
0
votes
2
replies
10
views
Importing local packages in PyCharm displays an an error, but works
I have a Python package locally installed via 'pip install -e .' I can call things from that library in other projects, everything works OK.
I am working with PyCharm, and each time I start with that ...
2
votes
1
answer
73
views
Is it possible to use a shebang to force a certain Python 3 version (e.g. python3.12 instead of python3)?
I recently came back to a game I have been making, but I came back to a bunch of library errors and the like. pygame.mixer didn't seem to work with the most recent version of Python (3.14) so I ended ...
0
votes
0
answers
37
views
How do you solve "Unable to import 'cx_freeze'" - E0401:import-error?
I am using cx_freeze for the first time, and ran the quickstart command to begin working on the package. However, upon opening the setup file in VSCodium I received the error message:
Unable to ...
Advice
0
votes
2
replies
19
views
Cropping a graph in python
can someone help me crop my graph so that it only contains the useful part of the graph. This is the area after the pendulum starts swinging and the area before the readings get too noisy due to low ...
0
votes
0
answers
73
views
Python Multiplication of Two Arrays that May or May Not Have Same Shape
I have a problem where I have two arrays that can possibly have different shapes that I want to multiply together. Let's say I have two cases (I'm just using zeros right now cause all I care about is ...
1
vote
1
answer
38
views
Add context info without modifying root logger
I have some custom file writing library code which uses the logging module, like this:
import logging
logger = logging.getLogger(__name__)
class FileWriter:
def write():
logger.info(&...
-3
votes
0
answers
48
views
I get an unbalanced diagonal matrix when trying to find the eigenvalues [closed]
I want to find the eigenvalues of a diagonal matrix using a symmetric matrix.
When I do this in Python, I get an unbalanced diagonal matrix. The value of [0, 0] is much larger than the other ...
-4
votes
0
answers
49
views
Troubling Scope Issues Within Definition [closed]
I’m seeing constant UnboundLocalErrors related to an assignment having established both definition and pre-assignment prior within the function definition of the class.
# Delete middle node
def ...
1
vote
1
answer
37
views
pynetdicom C-GET fails when multiple transfer syntaxes are requested for compressed images
I am implementing a C-GET SCU using pynetdicom to retrieve CT images. When retrieving CT DICOM images with 'JPEG-LS Lossless Image Compression' transfer syntax, The SCP logs show the following error.
...
-8
votes
0
answers
83
views
How do I detect if any python file (.py) is open in Python? [closed]
I want to make a Python Project Manager called Lead. But since it's a project manager it needs to create and open existing/new .py files. Please comment if you have a solution. (Python3)
1
vote
0
answers
25
views
RL agent fails to converge/improve average reward in Gymnasium FlappyBird-v0 Tabular Q-Learning
I'm currently training a tabular Q-learning agent for Flappy Bird Gymnasium and don't know why the agent isn't learning better. Is it due to problems with discretization, the algorithm, the reward ...
Advice
1
vote
2
replies
33
views
Learning Machine Learning and AI
I am a fresher currently working with Python and Pandas for data handling and analysis. I am very interested in learning Machine Learning and AI, but the field feels very vast and confusing because ...
0
votes
0
answers
42
views
Why am I getting a stack trace with no exception in the message section when I run my selenium crawler
I hosted my selenium crawler API on render it takes data from one site and puts it in another site. When I test the app on the FastAPI interactive docs I get a stack trace with no exception so I can't ...