396 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
103
views
Pyttsx3 only plays the first message of three
I'm trying to use Pyttsx3 to play three messages using text-to-speech. However, it's only playing the first message. How can I play all three? I'm currently using Python 3.11 on VSC
#Imports
import ...
2
votes
1
answer
119
views
Type checker highlights 'Unexpected argument' for dynamically generated function
I'm trying to create a function dynamically. Here is an example:
import ast
import textwrap
from typing import Any, Callable, List, Union
def create_function(
func_name: str,
arg_types: List[...
4
votes
1
answer
103
views
TaskGroup in Python 3.11 freezes if one task raises an exception - is it a known bug?
There are two tasks in a task group. One of them raises, the other one should be cancelled. This works fine in Python 3.12+, but freezes in Python 3.11. Older versions did not support task groups.
Is ...
0
votes
0
answers
178
views
Using OpenStreetMap on Superset
I am trying to setup Apache-Superset, so that it uses OpenStreetMap instead of MapBox.
I am currently using Superset in their local Python Version (not the Docker one), I have modified the config.py ...
0
votes
0
answers
230
views
How to install Miniconda or switch Python version (3.12 → 3.11) in Modal Notebooks?
I’m trying to run Chatterbox TTS on Modal Notebooks.
Modal by default uses Python 3.12, but chatterbox requires dependencies (like numpy==1.25.2) that fail to build because distutils was removed in ...
1
vote
1
answer
1k
views
Unable to uninstall Python 3.11 on Windows 11 – Error when uninstalling from Settings/Control Panel. Gets 'D:\Config.Msi\e9e4050.rbf'. Error: 5
I was trying to uninstall Python 3.11 from my Windows 11 Pro 24H2 laptop.
When I tried from:
Windows Settings → Apps
or
Control Panel → Programs and Features the uninstallation failed multiple times.
...
0
votes
0
answers
44
views
C Function Stalls in Docker but Works Fine on EC2
Technical Details
The stall occurs in a C function from a shared library that performs numerical calculations for Rayleigh wave phase velocities
Using py-spy, I traced the issue to this specific ...
0
votes
0
answers
37
views
Waitress does not run when trying to execute explicitly with a specific Python version
We have to manage several Python versions for several requirements and we have three different Python versions: 3.8, 3.11 and 3.12. When executing the Waitress server with a specific version, it does ...
-1
votes
1
answer
196
views
Azure Function App -Calling a function in another file from function_app.py
Very simply!
I have a function app - function_app.py, trigger.py and init.py in the root
Its my first Azure Function App.
if i run the two files separately, function_app.py, trigger.py, they both ...
1
vote
1
answer
96
views
Why can I not get Python 3.11.0 to report the expected machine architecture after installing from python.org
I have downloaded and installed the macOS 64-bit universal2 installer for Python 3.11.0 - Oct. 24, 2022 from macOS 64-bit universal installer on my Apple M4 Silicon macBook Pro.
When I open the ...
1
vote
1
answer
257
views
Why does pathlib.Path.glob function in Python3.13 return map object instead of a generator?
I was playing around with Path objects and found an interesting behaviour. When testing with python3.11, Path.glob returns a generator object.
>>> from pathlib import Path
>>>
>&...
0
votes
1
answer
510
views
Django WSGI and ASGI
How can I run the ASGI and WSGI protocols separately in my Django project?
This is my project structure.
.
├── chat # <== my app name
│ ├── apps.py
│ ├── consumers.py
│ ├── __init__.py
│ ├─...
3
votes
1
answer
427
views
What is the correct way to please the typechecker for a '(bytes | str) -> str' function?
I have the following code:
def from_utf8(string: bytes | str) -> str:
if isinstance(string, bytes):
return string.decode("utf-8")
else:
return string # <- type ...
1
vote
1
answer
62
views
Performance and Memory duplication when using multiprocessing with a multiple arguments function in Python?
I am having difficulties understanding logic of optimizing multip-rocessing in Python 3.11.
Context:
I am running on Ubuntu 22.04, x86 12 cores / 32 threads, 128 GB memory
Concerns:
(Please refer to ...
0
votes
0
answers
30
views
Python Postgres pull as byte object vs str
I'm doing a basic Python Flask application with a Postgres database using psycopg2. I'm having trouble setting up the user registration password hash as it appears I'm working with a string vs byte ...