2,208,777 questions
- Bountied 1
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
10
views
Python socket.io frequent websocket disconnections
I’m facing persistent WebSocket disconnections in production on Azure App Service (Linux container) during long-running operations (60–120 seconds). The same setup works fine locally in Docker.
...
0
votes
0
answers
8
views
How to export connections results in Plaxis Output with Python
I am working with tunnel segments connected by a series of connections in Plaxis. However, I am having difficulty exporting results from these connections (rotation, moment, etc.). None of the usual ...
-4
votes
0
answers
32
views
Please tell me what's wrong [closed]
I created a tetration (a 4th-order hyperoperator) in Python but the code doesn't work:
def tetration(tet, n, f):
if tet == 0:
print(f)
return
f = n ** f
tet -= 1
...
0
votes
2
answers
25
views
plotly express trandline cannot import name '_lazywhere' from 'scipy._lib._util'
I used to be able to run ols trendline in plotly express without issue, but now it returns this error:
ImportError: cannot import name '_lazywhere' from 'scipy._lib._util'`
This code works:
# Works
...
0
votes
0
answers
26
views
How to mask and inpaint a fixed region across video frames using FFmpeg + OpenCV?
I’m removing a static logo watermark that always appears in the same fixed rectangle (e.g. bottom-right corner) for short MP4 clips.
Goal:
• Decode frames → apply a fixed mask → inpaint masked ...
0
votes
0
answers
27
views
Keras to_categorical results in different memory allocation error every re-run
I'm working on a semantic segmentation model through U-net for classifying 11 categories. After splitting my image and label data into training and testing arrays, I turn the arrays into Unsigned ...
-2
votes
1
answer
62
views
Why does modifying a list while iterating over it in Python skip elements? [duplicate]
I'm trying to remove items from a list while iterating through it, but I'm getting unexpected behavior where some elements are skipped.
Here's my code:
numbers = [1, 2, 3, 4, 5, 6, 7, 8]
for num in ...
Advice
0
votes
0
replies
50
views
Sending a one-way live stream of the computer screen on startup to a web app via WebRTC
I want to make as soon as the computer turns on, it immediately starts sending a live screen (and audio, although audio is not necessary, the video is what matters) stream to a web app via WebRTC. The ...
0
votes
0
answers
19
views
max-request, reload-on-rss are applicable only for workers. Then how to avoid memory leaks in mules?
I’m observing continuous anonymous memory growth in a uWSGI mule process in a Python application.
According to the official uWSGI documentation, options such as max-requests and reload-on-rss are ...
-4
votes
0
answers
21
views
mocking smbclient call that yields a json result [duplicate]
I have a method:
def getOldData():
oldData = {'PVData':[]}
with smbclient.open_file(PATH, mode='r', username="x", password="x") as f:
oldData = json.load(f)
...
0
votes
0
answers
67
views
Tkinter does not display Frames correctly after grid_remove() under macOS
I have the following problem. I created a desktop application to generate invoices for my dad's company. The machine I wrote this application for is an iMac from 2011 running macOS High Sierra (10.13....
3
votes
1
answer
71
views
How to set journaling mode in Python 3.12 and Sqlite3 with autocommit=False
The recommended way of controlling transactions is via the autocommit attribute; since version 3.12, it is preferred to be set to False.
autocommit=False leads to this code failing, because we start ...
0
votes
0
answers
40
views
Locust webui is not overriding the default values if any defaults are provided (Locust 2.43.0 / Python 3.14.2)
I'm new to both Python and Locust, so I might be doing something wrong.
If I define custom parameters like this:
@events.init_command_line_parser.add_listener
def _(parser):
parser.add_argument(&...
0
votes
1
answer
77
views
Why should I set the parent of a widget to the canvas when placing it as window item?
Why does the "tk-toolkit" treat the window item differently when the parent is not canvas?
When distributing events for example:
import tkinter as tk
def enter_event(event):
print(f'...
1
vote
1
answer
95
views
BeautifulSoup: Unable to extract article body text and Topics text despite using correct class names
I am writing a Python script to scrape news articles from a specific website. While I am successfully able to extract the Title, Author, and Category tags (Sectors, Regions, Topics), I am unable to ...