56 questions
0
votes
1
answer
109
views
Child widgets not shown correctly if parent Frame is gridded later
I have an application that divides the main window in two:
Left: a canvas, where a map will be displayed
Right: a frame, where several other frames will share space and one of them will be shown ...
Advice
1
vote
2
replies
110
views
How do I help Pylance to know that the base class is still a test case?
I have a series of unit tests that should run for two different implementations of a same “interface.” Those tests use only the methods that exist in both implementations. Since they end up identical, ...
-4
votes
0
answers
30
views
Why do PyInstaller files consume so much memory? [duplicate]
Why do Python programs, when I package them into an exe use PyInstaller, are so large (often several hundred MB)? Packages made by others are very small. The same file, when I packaged it using cx ...
2
votes
0
answers
173
views
Memory leak in aioboto3 (aiohttp) after upgrading to Python 3.13
I’m seeing a steady memory increase in my ECS containers after upgrading Python and dependency versions.
The memory growth stops when I stop incoming gRPC requests, but it never drops back down ...
1
vote
0
answers
44
views
Interactive mode configuration in VS Code
There seems to have been a change in Python when interactive mode in VS Code.
When I would run
>python3 -i
Expected Result: the >>> would be pink and I could quit by typing quit
Now, it's ...
4
votes
1
answer
550
views
Python 3.13.5 sqlite3 DeprecationWarning persists despite registering custom date adapter
I am building an application using Python 3.13.5 and the native sqlite3 library. To correctly handle datetime.date objects and avoid the new DeprecationWarning, I am trying to implement the officially ...
1
vote
0
answers
330
views
Python 3.13.5 Ctypes and Tkinter imports not working
So I installed python 3.13.5 today and tried to run my projects with ctypes and tkinter.
It had worked fine before the installation, but it didn't work after
When I ran my project with ctypes in it ...
2
votes
3
answers
117
views
Can I name a variable as the data structure it represents?
I am using Python 3.13.5 in a Jupyter Notebook (inside VS Code) and ran into a TypeError.
First, I created a set, which worked fine:
my_set = {1, 2, 3, 4, 5}
print(my_set)
Then, in a different cell, ...
0
votes
0
answers
76
views
TCP socket server hangs randomly and rsa Decryption error raised randomly
I'm trying to make a server for a password manager I'm building, but the server seems to hang randomly and it seems to randomly throw rsa.pkcs1.DecryptionErrors randomly too. I did recently switch ...
0
votes
1
answer
83
views
How to make the corners of a text box rounded in Tkinter?
Here is my code -->
import tkinter as tk
from tkinter import ttk
win = tk.Tk()
WIDTH, HEIGHT = 500, 500
win.geometry(f"{WIDTH}x{HEIGHT}")
text = tk.Text(win, height=5, width=10)
text....
0
votes
0
answers
51
views
Tkinter button text/image not updating after incrementing a value in another class
I'm working on a Tamagotchi-like app in Python with Tkinter. I detect clicks on a canvas item and increment a "clicks" counter stored in a JSON-backed character object. When the clicks reach ...
0
votes
1
answer
62
views
GDB not detecting GLib auto-load python scripts
Following this article, GDB is installed in the same prefix as glib (I'm using official distro packages. However, when I run info auto-load python-scripts, I get No auto-load scripts. I have enable ...
0
votes
1
answer
69
views
Django POST error: response variable not associated with a value error
This one for python wizards. I got next code in some of my messenger class:
response: Dict[str, Any] | None = None
try:
response = self.client.post("url/", data=...
-2
votes
2
answers
585
views
pip install spacy errors with Python 3.13
I'm new to Python and I was given this code by my professor which includes "import spacy" and when I run the code I get the line: ModuleNotFoundError: No module named 'spacy'
That's where I ...
1
vote
1
answer
102
views
Python 3.13.0's tkinter's canvas.itemconfigure returns an error for some reason
I am making a program called "Clocker" and i am using canvas.itemconfigure to change canvas.create_text text property, i think i am just using it wrong, but i want to upload this to be sure,
...
1
vote
1
answer
363
views
Error using cv2 in python3.13 free-threading mode
Without python3.13 free-threading, cv2 importing numpy is fine. But when python3.13 free-threading is turned on, when cv2 tries to import numpy, numpy gives this error:
ImportError: Error importing ...
1
vote
1
answer
254
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
0
answers
79
views
Trouble installing pyenv with brew on mac due to openssl version
Has anyone ever been able to install the most recent version of pyenv on their computer? I just updated my python to 3.13.2. I tried through brew and run into this issue:
==> Installing ...
0
votes
0
answers
58
views
Best way of handling uwsgi with a Deadsnakes Python version?
I am running uwsgi + nginx on Ubuntu. Of course, ubuntu has perfectly good packages for uwsgi, but they use the current system Python. I'm running uwsgi against Python 3.13. Currently, I'm building it ...
1
vote
0
answers
113
views
Open PNG Imgur images via link
I want to read an image I uploaded on Imgur (I have the image link saved in a database).
My code is as follows:
ImageFile.LOAD_TRUNCATED_IMAGES = True
card : Optional[Card] = await interaction.client....
5
votes
1
answer
661
views
Python 3.13.1 Breaks Indentation When Pasting Code in Terminal [duplicate]
Python 3.13.1 results in unexpected indentation errors when I copy and paste Python code into its windows terminal (as shown in the pic below). This did not happen in Python 3.12.x or earlier.
In ...
2
votes
0
answers
480
views
pipenv run pip install langchain-chroma gives errors
I am trying to learn genAI and installing langchain-chroma as part of the training. I get the following error. It shows an error unknown compilers. I am running this on windows. Is there a way to get ...
9
votes
1
answer
964
views
How to paste code into the REPL without adding extra spaces on the left [closed]
I am running Python 3.13.1. When I paste code into the Python REPL, Python adds extra spaces at the beginning of every line after the first.
I wrote this code in Notepad and pasted it into Python.
if ...
-1
votes
2
answers
59
views
Webbrowser Module Doesn't Work with Lists
I'm new(ish) to Python, and am trying to create a link manager software. I have ran into an issue in my code, however: apparently, the webbrowser module doesn't work with lists?
I tried doing simple ...
0
votes
0
answers
395
views
Installib ta-lib for python
I have read all/most of the other related posts but could not make it work.
It looks simple in theory when looking at the page here:
https://pypi.org/project/ta-lib/
but after runnning "make"...
0
votes
0
answers
46
views
How to replace Unicode LaTeX strings in Python 3.13?
I am trying to replace multiple instances of a given Unicode string in a group of LaTeX files. For example, the original line reads:
\greek{῾Ρώμην}\nft{2}{ \greek{Ῥώμη, ῥώμη}: \textit{bodily strength,...
0
votes
0
answers
44
views
Matplotlib: How does it work and why does it only show the positive x-axis? [duplicate]
I have code where I want the user to be able to give a function, which will then be graphed with Matplotlib. So I look up online how Matplotlib works, and I end up with this code:
framegraph = Frame(...
1
vote
1
answer
438
views
Unable to install pyfolio
C:\WINDOWS\system32>pip install pyfolio
Collecting pyfolio
Using cached pyfolio-0.9.2.tar.gz (91 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python ...
0
votes
0
answers
47
views
Error installing pip packages due to error in launcher and wrong python version [duplicate]
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" &...
0
votes
1
answer
121
views
Issues with python-to-excel libraries (xlwt) failing to create xls files
I'm using the last python version to date (3.13.1). I can compile code with xlwt, and executing my code though the console works. But when I want to execute the file double-click style it fails to ...
3
votes
2
answers
5k
views
How to create a virtual environment with Python 3.13 "free-threaded" on Windows?
I am trying to create a virtual environment with Python 3.13 in "free-threaded" mode (GIL disabled) on Windows. I have successfully installed the GIL-free build of Python 3.13, and when I ...
0
votes
0
answers
59
views
Extracting data from a table with known labels with tesseract
I am trying to use Tesseract to create a small Windows application that allows the user to:
Take a screenshot of the monitor and cut a smaller portion containing a table (the table always has the ...
1
vote
2
answers
294
views
Python 3.13 REPL key-binding ctrl+arrows not working
Previously when I ran py3.12 in shell I could use ctrl + left arrow or ctrl + right arrow to move one word back or forward (skip words).
Recently I've upgraded to py3.13 and it doesn't work anymore, ...
0
votes
0
answers
291
views
Why does unpacking with the new generic syntax in Python 3.13 cause a mypy error?
I am trying to use the new generic type syntax introduced in Python 3.13 for defining type aliases with unpacking (*). While the code executes correctly, mypy raises a type-checking error. The same ...
2
votes
3
answers
10k
views
Python 3.13 Install on Standard Ubuntu Causing Unmet Dependencies Error
I have a standard Ubuntu remote server from HostWinds that is set up per their normal settings, Ubuntu 22.04.5 LTS. I added MySQL, but otherwise I have made very few changes except I installed Python ...
2
votes
1
answer
85
views
Why reference count of None object is fixed?
I was experimenting with refcount of objects, and I noticed the reference count of None object does not change when I bind identifiers to None. I observed this behavior in python version 3.13.
Python ...
0
votes
0
answers
90
views
Exception when importing freeze in Python 3.13
I created a virtual env with;
conda create --name base_313 python=3.13 -y
conda activate base_313
code .
Then ran this code;
from types import freeze
class k:
AGE = 42
NAME = "Zoubida&...
-2
votes
1
answer
3k
views
Issues with pip following the installation of Python 3.13 on Ubuntu
I'm using Ubuntu 20.04.6 LTS.
This computer originally had Python 3.8 installed. However, I needed to use Python 3.13. To achieve this, I added the Deadsnakes PPA and installed Python 3.13. I then ...
2
votes
1
answer
985
views
How can I fix the Python REPL in VS Code with Python 3.13?
I'm having trouble sending code in Python file to the interactive REPL in VS Code (using Shift + Enter).
Single line code and functions with one line work fine, but any code chunks with multiple lines ...
6
votes
4
answers
9k
views
KeyError: '__version__' installing openai-whisper on Python 3.13
Getting this error when I try to download Whisper
Python version 3.13 -
I wasted a lot of time figuring out the problem - can anyone help? I even tried reverting to a lower version but didn't help.
...
0
votes
2
answers
3k
views
Cannot import pandas in python3.13 free-threading mode
I'm trying out pandas in free-threading python. According to pandas document, pandas==2.2.3 can be used in python3.13.
I installed python3.13 on Windows11 and created virtual environment.
python3.13t -...
1
vote
2
answers
266
views
_tkinter.TclError when trying to import FreeSimpleGUI and running it in PyCharm
I am trying to create a desktop GUI by importing FreeSimpleGUI by using the code below:
import FreeSimpleGUI
That code produced the following error:
Traceback (most recent call last):
File "C:\...
4
votes
1
answer
349
views
Python 3.13 REPL with vim or emacs key bindings?
I just upgraded to Python 3.13 and found that the vim key bindings that I had set up via readline and ~/.editrc, which worked in previous releases of the Python REPL, no longer work. Is there some way ...
0
votes
1
answer
70
views
How to properly fill entry fields, and how to make the root appear just when is asked for
So, I am creating a database, on Python (Tkinter). Everything was going well, untill I realized that when I try to autofill the entry field by selecting a product, these are not well populated. The ...
1
vote
0
answers
492
views
pip fails with ModuleNotFoundError: No module named 'distutils' when running from python 3.12 or 3.13
I have several versions of Python installed (via apt). And when I run
$ python3.${version} -m pip
it displays the help message as expected when version ≤ 11. But it fails on 3.12 and 3.13:
Traceback (...
5
votes
2
answers
7k
views
Why do I get "This probably means that Tcl wasn't installed properly"
I'm using Python and PyCharm on Windows 11. I recently upgraded from Python 3.12 to Python 3.13. When running in PyCharm, I now get the error
_tkinter.TclError: Can't find a usable init.tcl in the ...
0
votes
2
answers
225
views
Maximize Window
I have a simple Python tkinter script which superimposes a black bar over the normal tkinter header (ie the one containing the tk emblem on the left side and the decorations on the right side). When ...
2
votes
2
answers
1k
views
Trying to import latex2sympy2 and ERROR "ModuleNotFoundError: No module named 'typing.io'; 'typing' is not a package"
I followed step by step installation for the Latex Sympy Calculator from this page : https://github.com/OrangeX4/Latex-Sympy-Calculator/blob/main/README.md
But when trying, on VS Code, import ...
2
votes
2
answers
2k
views
"TypeError: Couldn't build proto file into descriptor pool" with google-cloud-compute
I'm running a Python application on Ubuntu 22 with Python 3.13.0.
Since upgrading Python from 3.12, I get this error when running the application:
TypeError: Couldn't build proto file into descriptor ...
0
votes
1
answer
262
views
Cannot install numexpr and pandastable packages under Python interpreter 3.13
I am trying to install pandastable package in PyCharm Community Edition 2024.2.3, project's interpreter in (venv) being Python 3.13, but process ends with error :
note: This error originates from a ...