Questions tagged [python-3.9]

A version of the Python programming language, first released on October 5, 2020. This tag is for issues that are specific to Python 3.9. For general questions use the more generic [python] and [python-3.x] tags.

3.9 was released on October 5, 2020 (PEP 596).


Use this tag if your question is specifically related to Python 3.9. Otherwise, use the following guidelines to determine which tag(s) you should add to your question:

  • If your question applies to Python in general, use only the tag.
  • If your question applies to Python 3.x but not to Python 2.x, add the tag .
  • If you aren't sure, tag your question with and mention which version you're using in the post.

References

1128 questions
3
votes
0 answers

Gunicorn TypeError __call__() takes from 1 to 2 positional arguments but 3 were given with Flask application Factory

I have been searching through for days now trying to find an answer to why this is happing. I have a Flask application using the application factory method. Everything runs fine via the Flask development server, so now I'm trying to deploy with…
3
votes
2 answers

Pygame installed on windows, getting "pygame.error: Failed loading libwebp-7.dll" when trying to call pygame.image.load()

I've got python 3.9.1 running on a windows 10 machine. I have pygame 2.0.1 installed on my machine via pip (python -m pip install https://github.com/pygame/pygame/releases/download/2.0.1/pygame-2.0.1-cp39-cp39-win_amd64.whl) however on calling…
3
votes
1 answer

Alembic migrations in ormar not working (FastAPI)

I want to migrate through Alembic, but something doesn't work. I don't understand what exactly I'm doing wrong. My alembic .env from logging.config import fileConfig from sqlalchemy import create_engine from sqlalchemy import…
3
votes
1 answer

Did Python 3.9 update how to type hint the function type?

Before 3.9 I would have used this: from typing import Callable def my_function(argument_function: Callable) -> None: Now I am not sure anymore. PEP 585 has a list of deprecated Typing-types that does not include typing.Callable but does include…
3
votes
2 answers

Can't install pip3 for python 3.9

I've tried everything, I've tried doing the following: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3.9 get-pip.py But that just gives me the following error: root@ubuntu18:~# python3.9 get-pip.py Traceback (most recent call last): …
infamous hvher
  • 171
  • 1
  • 3
  • 8
3
votes
1 answer

TypeError: type 'types.GenericAlias' is not an acceptable base type

Okay so I compiled my python project into an executable and it worked on my computer but I sent it to a couple of friends to test and they all got this error. I have never seen an error like this before. I used Nuitka to compile the code. Traceback…
CheemaOTB
  • 39
  • 1
  • 3
3
votes
0 answers

Rationale of __instancecheck__ on protocols

Below is the complete source code of the class _ProtocolMeta used as metaclass for typing.Protocol in Python 3.9: class _ProtocolMeta(ABCMeta): # This metaclass is really unfortunate and exists only because of # the lack of…
Min-Soo Pipefeet
  • 2,208
  • 4
  • 12
  • 31
3
votes
0 answers

module 'http.client' has no attribute 'HTTPSConnection'

I am trying to run a python file on a Red Hat Enterprise Linux Server 7.6 (Maipo) distro with python3.9.1. I am getting the below error. $ python3 /opt/IBM/WSC.py Traceback (most…
3
votes
1 answer

python input prompt string length

How to increase maximum length of string that can be put into prompt from input function? I have a following test script if __name__ == "__main__": a = input('test input:') print(a) and I can insert only 1024 characters into prompt, the…
pieca
  • 2,463
  • 1
  • 16
  • 34
3
votes
2 answers

Non-inheritable method in python

Suppose I have two classes, one inheriting from the other : class A(): def __init__(self): pass def doSomething(self): print('It Works !') # Insert actual code here class B(A): pass How do I make the doSomething method…
ice-wind
  • 690
  • 4
  • 20
3
votes
7 answers

I am using python 3.9 and I can't figure out how to install pyaudio in my Windows 10

Currently using Visual Studio Code Tried using pip install pyaudio but it simply gave an error like: PS C:\Users\NIKHIL> pip install pyaudio Defaulting to user installation because normal site-packages is not writeable Collecting pyaudio Using…
Nikhil Mundhra
  • 31
  • 1
  • 1
  • 2
3
votes
2 answers

blpapi in python version 3.9

I am trying to install the blpapi in python version 3.9 For the record i am able to get 3.7 and 3.8 working using the standard setup and running the pip command at the bottom of this page: www.bloomberg.com/professional/support/api-library The only…
D.L
  • 4,339
  • 5
  • 22
  • 45
3
votes
2 answers

I'm trying to install Kivy with Python 3.9.0 and it gives me an error after I type: python -m pip install kivy

I'm on Windows 10. I was following the instructions on https://kivy.org/doc/stable/installation/installation-windows.html# and I reached the part where it says: Install Kivy: python -m pip install kivy==1.11.1 After I type it in cmd, it gives me an…
khalrab27
  • 73
  • 2
  • 7
3
votes
1 answer

When to use dictionary | (merge) vs |= (update) operator

When to use the merge vs update operators on dictionaries. The following examples, while there are differences in how to call them, their output is the same. a = {1: 'a', 2: 'b', 3: 'c', 6: 'in both'} b = {4: 'd', 5: 'e', 6: 'but different'} Using…
John Salzman
  • 500
  • 5
  • 14
3
votes
1 answer

failed building wheel for psycopg2

I need to download the package psycopg2 in order to work with the postgresql database in use. Unfortunately, when I try to pip install psycopg2 the following error pops up: failed building wheel for psycopg2 my os: windows log Building wheel…
nn.ff
  • 41
  • 1
  • 4