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
-1
votes
1 answer

Python 3.9 use OR | operator for Union types?

Since Python version 3.10, Unions can be writte as X | Y which is equivalent to Union[X, Y]. Is there some way/workaround to easily use (or just ignore) the X | Y syntax on Python 3.9? I have a bigger Python package that is making exentsie use of…
slarag
  • 153
  • 8
-1
votes
0 answers

Incompatibility of PyQt and Pygame

Hello everyone I have the code for the project and there is a problem there, which is that after working with PyQt, part of the code with Pygame works correctly. But when the opposite does not work, i.e. after PyGame, PyQt does not work and the code…
-1
votes
1 answer

How can I draw a projectile arc on turtle graphics?

I need help with learning how to draw a arc in turtle graphics. I would prefer a simple set of code that I can easily incorporate into my pre-existing code. I've tried to make an arc following online instructions but its not projectile, its more…
Polly
  • 9
  • 2
-1
votes
1 answer

Unable to print Escape Seqences with Python in Visual Studio (Win 10, Python 3.9, VS 2019)

My Issue I'm a begginer with Python, and I've been working on code in Visual Studio in which I want to be able use ANSI Escape Sequences to format my output on the terminal console. I'm using Python 3.9, Visual Studio 2019 (Community Edition) and…
Runsva
  • 365
  • 1
  • 7
-1
votes
1 answer

local variable 'counter' referenced before assignment

I am running the below code and getting this error. I am used to c# syntax but this doesn't make any sense The rest of the code is working i have tested. Only counter is the problem at the moment import logging from transformers import…
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
-1
votes
1 answer

How to extract a certain part of code with Beautiful Soup

I'm working on a private project, and I've a question about Beautiful Soup. I'm using python 3.9.2 and Beautiful Soup 4.9.3. My html code is: style="transform-origin:50% 50%;transform:rotate(382deg) I want to get the part: 382deg. Does anyone now…
w kooij
  • 22
  • 5
-1
votes
1 answer

XML parsing in python issue using elementTree

I need to parse a soap response and convert to a text file. I am trying to parse the values as detailed below. I am using ElementTree in python I have the below xml response which I need to parse
-1
votes
1 answer

Learning Python and need some direction with paths

stuck right now. Trying to make a website and have an ImportError I have no idea how to get around. Files are organised as such Main folder: website Secondary folder1: static Secondary folder2: templates - init.py , auth.py , views.py ,…
-1
votes
1 answer

Discord server channel lister not working

I'm trying to make something that can list all the channels in a server of your choice, but it won't work. import discord client = discord.Client() token = ('TOKEN') @client.event async def on_connect(): print("What server do you want to…
-1
votes
1 answer

How can we write string matching code in Python without using regex?

How can I approach this problem? Write a program to print the following, Given a word W and pattern P, you need to check whether the pattern matches the given word. The word will only contain letters(can be Uppercase and Lowercase). The pattern can…
-1
votes
1 answer

Telepot on python, can't send multiple photos with sendGroupMedia

I'm trying to send 2 or 3 photos at the same time, so they're displayed as one message on my channel. To send one photos I used python's requests library, with this line of code; pic = {'photo' : open('p.jpeg',…
Serge
  • 1
  • 1
-1
votes
1 answer

Code returns TypeError and I'm not sure why

The code below returns 'TypeError: 'int' object is not subscriptable' when move_pas is called. The thnig is, is that the code affecting this is also in move_ag, but when I call that there is no error and I cant figure out why that is. I'm running…
-1
votes
1 answer

program is showing error in PhotoImage to open images in tkinter saying no such file or directory

I was making in GUI for a vending machine where i was trying to add images into the button but while making the program there the following error Traceback (most recent call last): File "e:\kanu\Coding Languages\VS code\4th semester\Data…
-1
votes
1 answer

Find value of A, B and C such that (A^B)+(B^C)+(C^A) is equal to given integer X

X is positive integer.I have to find 3 distinct numbers A, B and C such that 0 ≤ A,B,C < 230 and (A^B)+(B^C)+(C^A)=X where '^' is a bitwise XOR operator
-1
votes
1 answer

Tkinter delete methode

I'm using Tkinter, I defined the function below to clear entries but it only works for the entries that have default values even when I input new values in these entries it can delete them but it does not clear the entry that doesn't have default…