Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
107 views

Overview: I am trying to use a Pool internally in a module that is not __main__ and make it invisible to main that this pool exists. Because of this, if __name__ == "__main__": protection is ...
blizzdex's user avatar
2 votes
1 answer
59 views

The signature of sys.excepthook is sys.excepthook(type, value, traceback) so a natural way to call it is sys.excepthook(sys.exc_type, sys.exc_value, sys.exc_traceback) But as of Python 3.12, ...
Kodiologist's user avatar
  • 3,547
5 votes
1 answer
192 views

I just stumbled across this weird thing with python 3.12. I have a type I import under if TYPE_CHECKING:. When trying to reference this type without quotes, I expect a NameError, because the variable ...
Borisoid's user avatar
0 votes
0 answers
45 views

I'm trying to add an image for python3-zstandard to my yocto build. I know that it's included with versions of meta-python past Walnascar, but I'm on Scarthgap which does not include it. Basing the ...
Camstillo's user avatar
-1 votes
1 answer
114 views

I am using Google Colab, which comes with: Python 3.12.11 TensorFlow 2.19.0 When I try: !pip uninstall -y numpy jax jaxlib !pip install tensorflow_federated Pip starts backtracking and tries to ...
Ms.Bithi's user avatar
2 votes
0 answers
67 views

I have a large fortran 77 code, "NSCool", distributed among many files which I compile into a python package using f2py. It used to work nicely with python 3.7, then it took me weeks to have ...
Dany Page's user avatar
0 votes
0 answers
70 views

producer log: ERROR:kafka.conn:<BrokerConnection client_id=kafka-python-producer-3, node_id=bootstrap-0 host=redpanda:9093 <handshake> [IPv4 ('172.22.0.2', 9093)]>: Closing connection. ...
Frederick Yip's user avatar
2 votes
0 answers
67 views

A recently upgraded Ubuntu server (to 24.04) now uses Python3.12. Several Python programs stopped working after upgrade. The problem arose as soon as a connection to the MySQL database was asked. ...
Marc Vanhoomissen's user avatar
0 votes
0 answers
80 views

I upgraded python and ansible on an env after which started getting error "/bin/sh: /bin/env python: No such file or directory" in ansible-playbook execution, below are the upgraded versions ...
pmann's user avatar
  • 789
1 vote
0 answers
60 views

I'm trying in vain to make NLTK show a Frequency Distribution Plot using FreqDist.plot(). I've followed the steps from the first chapter of the NLTK book (scroll down to "3.1 Frequency ...
tohuwawohu's user avatar
  • 13.7k
0 votes
1 answer
134 views

I am working on a project using python3.12 which involves compiling .py files to binaries using Pyinstaller. After compiling, when i try to invoke binary I face following error File "...
AK47's user avatar
  • 1
0 votes
1 answer
54 views

When using the latest version of wandb in a Conda environment with Python 3.12, an error is raised due to a dependency on the distutils module—which has been removed in Python 3.12. The error ...
Omri Hirsch's user avatar
0 votes
1 answer
334 views

I am trying to get Google Colab running with Python 3.12. I ran the following: !sudo apt-get update -y -qq !sudo apt-get install python3.12 -y -qq !sudo update-alternatives --install /usr/bin/python3 ...
Ken Ocheltree's user avatar
1 vote
1 answer
127 views

I came across unexpected behavior in Python 3.12.6 while performing slice assignment. Here’s a minimal example: l3 = [2, 3, 4, 5] l3[::1] = [1, 3] print(l3) Since l3[::1] selects 4 elements ([2, 3, 4,...
Ansh Arya's user avatar
2 votes
0 answers
42 views

I'm updating the type annotations in my code for compatibility with Python 3.12. I'm taking the opportunity to enable strict type checking in VS Code (i.e. pyright). I have a subclass of enum, which ...
mikb's user avatar
  • 375
1 vote
2 answers
817 views

I am working on updating python version to 3.12.0 in my cloud function. After upgrading, Dataflow call was outputting the following message: httplib2 transport does not support per-request timeout. ...
Winston Kyu's user avatar
1 vote
1 answer
82 views

When I run this code using IDLE in windows, it spawns a temporary cmd window that disappears shortly thereafter. import numpy as np import matplotlib.pyplot as plt from sklearn.mixture import ...
KBriggs's user avatar
  • 1,498
0 votes
0 answers
236 views

I'm developing a Flask web app that uses the ccxt library to connect to an API. When trying to run my application, I'm encountering this error: AttributeError: module 'cryptography.hazmat.bindings....
Mohamed Amine's user avatar
0 votes
0 answers
46 views

I'm running a python script that receives data over a TCP connection. This connection can send multiple messages that consists of multiple variables which have multiple data types. When a string is ...
Arn's user avatar
  • 1
0 votes
0 answers
36 views

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 ...
Boomerang20thCentury's user avatar
0 votes
0 answers
97 views

I'm trying to get used to Beanie with Mongodb. The Problem that I'm running into is this: I cannot convert Documents of different types while retaining the revision_id. The necessary sample code: ...
AliSot 2000's user avatar
0 votes
1 answer
216 views

I several types of Widgets in my App. All share an interface I_Widget, including a read-only property "public_property". I want some of them to use a member instead of the property. from abc ...
Adam Ryczkowski's user avatar
3 votes
1 answer
157 views

The situation I want to use the Sphinx autodoc features to document a Python API that is implemented in the following way. I have a module that is used to expose various symbols (functions, constants, ...
Rigel's user avatar
  • 90
0 votes
1 answer
104 views

I'm trying to create the Breakout game with python's turtle module, but for something I haven't yet identified I can't center the image correctly! from turtle import Turtle class Game(): def ...
João Pedro F's user avatar
0 votes
1 answer
70 views

import logging import re import xml.etree.ElementTree as ET from ezdxf.addons.drawing import Frontend, RenderContext, svg, layout, config import ezdxf class ImageGenerator: def __init__(self, doc) ...
Kalyan Tarafdar's user avatar
1 vote
0 answers
682 views

I'm trying to install TensorFlow , but I keep encountering installation issues due to Python version compatibility. I’m using Python 3.12, but I get an error message indicating that TensorFlow doesn’t ...
emna d's user avatar
  • 11
1 vote
0 answers
1k views

first time coding in python and I need to add Pillow to edit some images, yet every time i try to install it I get the same error. This is the only library in which I've had any issue. I'm using a ...
luonn's user avatar
  • 11
1 vote
1 answer
90 views

It's unclear and confusing to me whether Blueprint and Flask configration is required if I use the extension Healthz(app)!?! The confusion comes from the README line: The rest of the configuration is ...
khteh's user avatar
  • 4,290
0 votes
1 answer
60 views

I have the following structure: project/ |- src/ |- __init__.py |- package/ |- __init__.py |- module1.py |- module2.py Let's say module1.py ...
khteh's user avatar
  • 4,290
0 votes
2 answers
46 views

I am trying to instantiate a singleton with constructor argument. However, passing the input arguments to the metaclass hits an error. from typing_extensions import List, TypedDict, Optional, Any ...
khteh's user avatar
  • 4,290
1 vote
1 answer
234 views

I recently upgraded my Ubuntu from 22.04 to 24.04 using the Ubuntu upgrade, and now when I tried cqlsh it gives me following error: Traceback (most recent call last): File "/usr/bin/cqlsh.py&...
best_of_man's user avatar
2 votes
2 answers
60 views

I have a column with dtype = object. It has either NaN or 123 - 456. I need to extract min and max into it's own columns: import numpy df["min"] = df["values"].map(lambda x: ...
khteh's user avatar
  • 4,290
-1 votes
1 answer
2k views

I am trying to show LangChain graph in my python module code. Not Jupiter notebook. However, the following code snippet: from IPython.display import Image, display from langgraph.graph import ...
khteh's user avatar
  • 4,290
0 votes
1 answer
350 views

How to use google_vertexai or google_genai with LangChain in Python? I get the following error: USER_AGENT environment variable not set, consider setting it to identify your requests. Traceback (most ...
khteh's user avatar
  • 4,290
2 votes
1 answer
127 views

I have created the necessary serviceaccount and clusterrolebinding with edit clusterrole but still fails to submit to a local k8s cluster: $ spark-submit --master k8s://https://127.0.0.1:16443 --conf ...
khteh's user avatar
  • 4,290
0 votes
1 answer
41 views

I have the following trained classifier: classifier = nltk.NaiveBayesClassifier.train(features[:train_count]) When I try to use it to classify(): result = classifier.classify(feature) and feature is ...
khteh's user avatar
  • 4,290
-1 votes
1 answer
83 views

I am using python==3.12.9, tried installing using command pip install discord.py # first error i encountered was C:\Users\khanh\AppData\Local\Temp\pip-build-env-ak7vjcgm\overlay\lib\python3.12\site-...
khanzala's user avatar
-1 votes
1 answer
130 views

The error that I see on terminal when I run my djanogo server on my instance File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib....
myanmar-girl's user avatar
0 votes
0 answers
475 views

I am trying to set up a package from a github repo. My default python in the conda environment is python 3.12. The pyproject.toml of the repo has the following lines: [project] name = "...
Mahi Luthra's user avatar
0 votes
0 answers
57 views

How to test POST request, especially to an endpoint which checks for csrf token? @pytest.mark.asyncio async def test_fibonacci_pass(client): response = await client.post('/fibonacci', data=b"...
khteh's user avatar
  • 4,290
0 votes
0 answers
34 views

I have the following structure: |- src/ |- common/ |- controllers/ |- models/ |- __init__.py |- test/ |- __init__.py |- some_test.py I am using python 3.12.7 and pipenv. ...
khteh's user avatar
  • 4,290
-2 votes
1 answer
107 views

I have the following test cases: CPP_CSHARP_REGEX_TEST_CASES = [ ("C++", True), ("C#", True), ("C+", False), ("C##", False), ("C", ...
khteh's user avatar
  • 4,290
0 votes
0 answers
41 views

So, now that I added SSL instead of TLS there's at least some progress, but it still doesn't work. I click the button, it processes for a 5-10 seconds and I get the error that connection unexpectedly ...
lumba's user avatar
  • 43
2 votes
1 answer
4k views

I am upgrading my project from python3.9 to python 3.12. I do use boto in my project to connect with s3 and all I keep getting below error from boto.vendored.six.moves import filter, http_client, map, ...
YourCodingBuddy's user avatar
0 votes
0 answers
68 views

I have Windows 11 Home 24.2 Python 3.12.8 PyCharm Community Edition 2024.3 venv with pip 24.3.1 Numpy 2.2.1 Scikit-learn 1.6.1 Scipy 1.15.1 threadpoolctl 3.5.0 joblib 1.4.2 Python installation is ...
fabrizio norcia's user avatar
0 votes
0 answers
47 views

When I try to get a pip package such as mexc_sdk for python 3.13, I get the error: pip install mexc-sdk Fatal error in launcher: Unable to create process using '"C:\Python312\python.exe" &...
Mur's user avatar
  • 1
1 vote
1 answer
1k views

I get an error when installing pygraphviz on a Windows 11 Pro ver 22 H2 and build 22621.2283 machine: C:\Windows\System32>pip install pygraphviz Collecting pygraphviz Using cached ...
Cabecita's user avatar
0 votes
0 answers
35 views

I am trying to make a CG membrane using Insane with python3. To make the membrane, I downloaded all the required files and installed insane. Then I modified the lipids.dat file to add the coordinates ...
Imjustagirl's user avatar
0 votes
0 answers
306 views

I want to achieve something like this: from collections import deque from typing import Iterable import numpy as np def mean[T](a: Iterable[T]) -> T: s = sum(a) return s * (1.0/len(a)) c =...
mirekh_68's user avatar
0 votes
0 answers
23 views

I managed to make it work after 2 days using the .py configuration file. Here is the code along with a minimal format. # Hypercorn configuration file import logging.config # Server binding options ...
fsedawd 's user avatar

1
2 3 4 5