2,209,292 questions
3
votes
0
answers
67
views
Communicating with two devices over BLE UART in python using bleak
Unfortunately, I don't have any experience with async programming, so it took me quite some time to get my code running on a Raspberry Pi 5 4GB (with bookworm 2025-05-13 OS) to communicate with one ...
Best practices
0
votes
0
replies
30
views
Prompt managing storing in git v.s. db
We are building an LLM-based application that takes a lot of user data from various internal sources. Sends the data to various prompts, which provide the answers needed to fill out forms correctly. ...
0
votes
0
answers
39
views
Sphinx sphinx-apidoc generated module titles are too long (full package path). How can I shorten them?
I am generating python API documentation using Sphinx and sphinx-apidoc with sphinx-rtd-theme
The problem is:
The page titles and ToC entries for modules/packages always show the full import path,
e....
2
votes
1
answer
55
views
Can't use lock around gather in Python asyncio
For some reason, this code doesn't work on Ubuntu 20, Python 3.8.10, unless the .gather line is commented out.
It works on Ubuntu 24, Python 3.12.3 and Windows 11, Python 3.13.9.
It doesn't work on ...
1
vote
0
answers
48
views
Using osmnx with OpenHistoricalMap?
I'm working on a data science project and specifically need historical borders through OpenHistoricalMap but I would like to use osmnx for data visualization.
Is it possible for osmnx to take from OHM ...
Advice
0
votes
1
replies
32
views
Share data between functions called by external library
I'm writing a slackbot using bolt_python which consists of writing functions that are called during events. Multiple of the events I want to respond to use the same data that I get from an external ...
0
votes
0
answers
42
views
Clustering without all pairwise distances
I have a set of binarized images containing forms, each image follows one of N layouts. There are a few outliers which do not follow a layout and contain random text and images.
The distance between ...
-2
votes
0
answers
67
views
Unable to get the correct year for a UTC timestamp [closed]
I am trying to get a year, and time in UTC format for a particular time
I am able to print the time in the desired format but it is always printing wrong year , not sure if it prints the correct time ...
0
votes
1
answer
50
views
Appropriate method to pass arguments in Flask without using the url
I am using flask and a deep learning model in tensorflow to display some annotated video. The module works fine but the loading of the model is lazy due to the nature of the generator. Only after I ...
1
vote
0
answers
29
views
Valve Control Sytem from Tuya
I'm working with a Tuya-based smart valve and I'm trying to identify the correct DPS values for controlling it (open, close, partial positions, etc.). When I read the device status locally, I only get ...
0
votes
0
answers
20
views
Unexpected behavior of pyautogui on Fedora
I'm currently trying to learn some pyautogui. I wanted to create function, that will hold mouse button and move it from one point to another, but clicking functionality seems to be not working ...
1
vote
0
answers
37
views
Adios2 Missing Library
I'm having trouble downloading Adios2 as I am trying to run Einstein's toolkit, and no matter how I download it, I keep being told I'm missing a library called "libadios2_evpath_mpi.dylib". ...
0
votes
0
answers
23
views
Certificate Verification using Blockchain with python ? Struck in the middle [closed]
I couldn't get the public key or public viewing format which is been initialized with bootstrap, I tried modifying my codes with possible AI suggestions nothing worked , out of help
Tasks involved , ...
0
votes
0
answers
72
views
A problem with Selenium WebDriver manager
I've been parsing some websites using Selenium webdriver (its Chrome variant in particular) about a month ago and all worked fine (using Google Colab). I'm trying to run the same code now and it doesn'...
2
votes
1
answer
43
views
NiceGUI Fits with Hight and Width of a Web Page
In following Python script I would like to know why horizontal and vertical scroll appear after the script run. I try all widgets just fit into a web page not exceed the page size. Here is my script:
...
0
votes
1
answer
24
views
Issue with Python Visuals in Power BI Embedded (.NET Core)
I am facing an issue with Power BI Embedded reports in a .NET Core application. The report contains Python visuals, which work correctly in Power BI Desktop and Service, but they do not render when ...
1
vote
1
answer
25
views
How do I apply multiple filters with different conditions using LlamaIndex's MetadataFilters
I am using LlamaIndex's MetadataFilters to apply a filter to my ChromaDB VectorStoreIndex as a query engine. I am able to set multiple filters if they are using the same FilterCondition but how would ...
0
votes
0
answers
42
views
Python asyncio script freezes indefinitely using Playwright and Semaphore [closed]
I am building a scraper/processor pipeline that iterates over a large list of URLs (~10k). For each URL, I perform the following steps asynchronously:
Scrape HTML using playwright.async_api.
Process ...
1
vote
0
answers
42
views
Pyrogram client appears as “Envoy Telegram Desktop/Android” — how can I remove the “Envoy” prefix?
I’m testing a simple Pyrogram client and noticed something strange when the session appears in Telegram’s Active Sessions list.
Here is my test code:
from pyrogram import Client
app = Client(
&...
Best practices
0
votes
4
replies
81
views
Python: two Flask projects under the same HTTP Port
I have 2 separate projects running on the same Linux server. Both projects based on Flask. Due to infrastructure restrictions I'm able to use only one HTTP Port on the server.
I would like to route ...
1
vote
1
answer
88
views
Visual Studio Code does not run Python file in the terminal when using venv, but gives no error and works in interactive window and debugger
I have been using Visual Studio Code to run Python for a few months, but recently when I select Run Python File or Run Python File in Dedicated Terminal, a new instance of PowerShell opens in the ...
2
votes
0
answers
79
views
Python-docx add_page_break is not visible in the document
I'm trying to write a document using python-docx library. I'm adding some simple text with and then I add page_break after each paragraph. Later on, I save and open the same file again. The ...
Advice
0
votes
2
replies
42
views
Better solutions for reseting 'is_running' flag to 0 when an exception occurs during code execution in python
I have a python code with below structure:
try:
# Check if ETL is running
check_isrunning_sms_journals = "select nvl(d.is_running,0) as is_running from running_etl_table d where ...
Tooling
0
votes
1
replies
45
views
Python install manager for offline installation
I do not really understand the new approach for Python installer on Windows. Will the Python install manager need a working internet connection?
I have several computers without internet that run ...
3
votes
0
answers
56
views
Spark-Redis write loses rows when writing large DataFrame to Redis
I’m experiencing data loss when writing a large DataFrame to Redis using the Spark-Redis connector.
Details:
I have a DataFrame with millions of rows.
Writing to Redis works correctly for small ...