Category "python-3.x"

Skip clicking on an element in the While loop, when opening a popup with selenium. Problem with While loop

This loop scrolls through the list of names on a web page and clicks on each "Add" button next to the name. It works well and correctly wait = WebDriverWait(dri

How do I combine a datetime and time fields?

I have two fields that I need to parse and combine together to form a full datetime field. The first field is a date field but in the form of a datetime field a

How to make my Pygame window always active and listening for input?

I spent the last 3 hours searching for a way to create a simple toggle button script that lets me know if a button on my Thrustmaster HOTAS has been pressed. As

virtualenv not activated on windows 11

Im using python 10 and windows-11 i try to activate venv with the following command .\onlineShop\Scripts\activate.bat I create venv using following command pyt

Python: Print string in reverse

Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Done", "done"

subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1 [duplicate]

I was trying to install the dlib package for my face recognition project but error keep getting in the way. This is another error and I don't

Getting the next element of a list on a function call

Is there a way to return the next element in a list on a function call, this is what I have tried so far: from itertools import cycle def get_next_element():

Removing the labels from a google cloud project using python

I'm trying to use the python client API to remove labels from a GCP project. I have been able to use this method to add labels, but the documentation is not cl

How to use and update same variable across multiple modules in python independently?

I have 3 files and I want to do something like below [1] conf.py var = 10 # Intialized with 10 (start) [2] file_1.py import conf print(conf.var) # Prints 10

How do I Concatenate or Combine the dictionary of same data to One

I have the below set of 7 Dictionaries {'empid':785, 'empname':'Ibrahim', 'date(2022,5,1)':'Unmarked'} {'empid':785, 'empname':'Ibrahim', 'date(2022,5,2)':'Unma

AttributeError: 'LinearRegression' object has no attribute 'coef_'

I am self-studying machine learning and python. I am using sklearn and I want to plot the regression line, but I get the attributeError: 'LinearRegression' obje

How to remove outliers from the list of timedelta objects? Python 3

I have a list of timedelta objects like timedelta(seconds=345) and I need a pythonic way to remove outliers from it. For instance I may have: timedelta_list = [

openpyxl: ValueError: Value must be one of {'selection', 'data', 'field'}

There is an xlsm file which I need to open and edit and extract data as per the macros enabled in the sheet. But I'm not able to open the file itself. I tried:

Unable to build the android application with buildozer and kivy

This is my last hope of getting the fixed for the buildozer python issue. I already raised an issue in github for kivy. But there was no valid answer for it. I'

How do I delete trailing objects drawn in tkinter?

My goal is to allow you to make a rectangle on your screen similar to using a rectangle or selection tool in paint. I've got it to mostly work but when you make

tweepy.errors.Forbidden: 403 Forbidden using Twitter API v2 functions in Tweepy?

I am just starting out with using Tweepy and have been having trouble when trying to use the v2 API functions to write a program to Tweet text. Currently, I am

"ModuleNotFoundError: No module named 'dbus'" on macOS

I'm getting an error when I'm using the notify2 module. ModuleNotFoundError: No module named 'dbus' The error is from the notify2.py file. When I tried pip in

Getting the current selected tab name of ttk notebook in tkinter? - python

I'm creating a GUI that shows different plot types in different tabs, so I created this helping function and I'm trying to figure out how to get the current tab

can't click() an onclick element with selenium (tried text link, partial text link, xpath, css selector)

I need to scrap some data from this url: https://www.cnrtl.fr/definition/coupe The data/results I need to scrap are located in those 3 different tabs: I'm unab

Background of image turning black when using keras.preprocessing.image load_img

my code: from keras.preprocessing.image import load_img, img_to_array from keras.preprocessing.image import smart_resize import numpy as np #load pretrained mo