menu

Recent questions tagged python

1 vote
1 answer
How do I get all the users into Mongo? I have a Python discord bot, I connected it to MongoBD, but I have a question: how to get all servers and all users in the database? ...
by TheMurkovich2
asked Sep 24, 2021
1 vote
1 answer
How can I sample a key from an array in sqlalchemy? There is a sql table key data---------------k1 d1k1 d2k2 d3k2 d4k3 d5k4 d6 Python has an array of things to select from a table sel ...
by Drottarutarnum
asked Sep 24, 2021
1 vote
2 answers
Python variable in a class is not assigned global, what's wrong? When self.choice_var = (0, 1) or (1, 0) happens, but choice_1 does not change to (0, 1) or (1, 0) but remains the original choice_1 = 0, 0 why? choice_1 = (0, 0)class c ...
by oledjigames
asked Sep 24, 2021
1 vote
1 answer
Why do I have an error in the code of my game? I get an error when I start the program Traceback (most recent call last): File "F:/Python/KolfBloodC/game3d.py", line 24, in <module> drawing.world(player.po ...
by loserprogramist
asked Sep 24, 2021
1 vote
2 answers
image
Writing a message on different lines in discord.py. Is it possible to combine discord.py and datetime? Hello. Making a bot for Discord. The functionality itself works, and I'm all satisfied. I need it to write one message, but on different lines. Also imported datetime, b ...
by FeeFort
asked Sep 24, 2021
1 vote
1 answer
What is the discord.py error? Error: Ignoring exception in command __balance: Traceback (most recent call last): File "C:\Users\TupaBan\AppData\Local\Programs\Python\Python38\lib\site-packages\dis ...
by TupaBan
asked Sep 24, 2021
1 vote
1 answer
How to correct a mistake? Can you tell me what kind of error is this? How can I correct it? ERROR: Failed building wheel for yarl Failed to build yarl ERROR: Could not build wheels for yarl w ...
by XYrexB
asked Sep 24, 2021
1 vote
2 answers
1 vote
2 answers
Python SyntaxError: invalid syntax how to solve? Hello. I have a small python script, run it on windows, it works fine. Took an Ubuntu 18.04 server. Installed python 3.7.9 (same version on Windows) I run the script ...
by peterfarmer
asked Sep 24, 2021
1 vote
1 answer
How does this condition work? X = "X"O = "O"EMPTY = " "TIE = "TIE"NUM_SQUARES = 9def display_instruct(): """Display game instructions.""" print( """ Welcome to the greatest intellectual ...
by koksraster
asked Sep 24, 2021
1 vote
1 answer
How do I delete a reaction message in discord? When a user is kicked/banned/mute, a message about it appears. I want it to have a reaction under it, clicking on it will delete the message, but I want it to work ONLY ...
by BlackHacker_YT
asked Sep 24, 2021
1 vote
1 answer
image
How do I install the speech synthesis library? Found a library To install it writes was only able to do the 3rd item pip install tensorflow 1 and 2 are they mandatory? or are these other ways tried pip install ...
by rafaelSalihov
asked Sep 24, 2021
1 vote
2 answers
How do I implement partial inheritance in python? Question for purely academic purposes, how can we implement the following behavior (without changing the derived class): spoilerclass Base: inherited_attr = 'some ...
by mkone112
asked Sep 24, 2021
1 vote
1 answer
image
Why does the site identify Selenium Webdriver as a bot? Hello, I'm making a script to fill out and submit a form on one site using Selenium. And sometimes these redirections appear: If I understand correctly, the websit ...
by bfesiuk
asked Sep 24, 2021
2 votes
1 answer
My compiled code is perceived as a virus, how can this be fixed? Here is the code itself: import getpassimport telebotimport timeimport webbrowserimport osbot = telebot.TeleBot("TOKEN", parse_mode=None)put = ("C:\\Users\\" + getpass. ...
by kokapuk
asked Sep 24, 2021
1 vote
1 answer
How can I eliminate the string index out of range error in this code? a=input()f=0q=""for i in range(len(a)): if 90>=ord(ai)>64: c=chr((ord(ai) - ord('A')) + ord('a')) q=q+c elif 122>=ord(ai)>96: ...
by Flazer606
asked Sep 24, 2021
1 vote
1 answer
How do I uninstall python? After removing python in the Scripts folder there are still modules, should I remove them? The same situation in the Lib folder. Or you need to delete python36 folder at ...
by 1Danshin1
asked Sep 24, 2021
1 vote
1 answer
image
PyAutoGUI installation error, what's wrong? I decided to install PyAutoGUI to create bots. I downloaded the archive, unzipped it. In cmd I write pip install pyautogui . It's downloading... At Preparing wheel met ...
by Endernyan83
asked Sep 24, 2021
1 vote
1 answer
Why does it produce an empty list instead of unloading the data? There are no errors in the other part of the code, everything works. get_html - I use requests to send a request to the server get_html - using bs to parse the data ...
by 66656665
asked Sep 24, 2021
1 vote
1 answer
How do I ignore the bot's reaction? Hello, everyone! My idea is that the bot sends you a message that hangs one reaction when you click on it is sent a certain text, but the problem is that the bot react ...
by NewUser9901
asked Sep 24, 2021