Category "python"

How can i use slenium in Python to click the button?

I try to find how can I click on button for accept cookies with a python in selenium, I used a lot of convinations but nothing works :( This is the element: &l

add_page() not accepting the parameters for width and height of the page in FPDF

I was converting a number of images to pdf using FPDF in python, however doing: pdf.add_page('P',x,y) (x and y are well defined and have values, pdf = FPDF())

Tornado error about attributes when deploying a server

I'm trying to run a program that works with Tornado (https://github.com/oduwsdl/CarbonDate), however, when I try to deploy a server with it, I get multiple erro

Tornado error about attributes when deploying a server

I'm trying to run a program that works with Tornado (https://github.com/oduwsdl/CarbonDate), however, when I try to deploy a server with it, I get multiple erro

How can i use slenium in Python to click the button?

I try to find how can I click on button for accept cookies with a python in selenium, I used a lot of convinations but nothing works :( This is the element: &l

What can be a faster way to iterate through the pixels of an image?

I'm trying to loop through all the pixels of an image using Pillow then append the pixels with their corresponding RGBA color into a dictionary What I have at p

How to deploy an exclusive conda package in heroku?

I´m using heroku to deploy a FastApi running in a conda virtual enviroment. I'm have installed all the packages using pip, but there is a package that is

ImportError: Imageio Pillow requires Pillow, not PIL! on M1 Mac

This question might have been asked several times but I am not able to resolve the error. I have pillow, imageio and other libraries installed on my M1 Mac. But

ImportError: Imageio Pillow requires Pillow, not PIL! on M1 Mac

This question might have been asked several times but I am not able to resolve the error. I have pillow, imageio and other libraries installed on my M1 Mac. But

NameError: name 'inslider' is not defined

Now I got a better looking new Overview of the Code: class innentemp: import ipywidgets as widgets from ipywidgets import interact import matplotlib.pyplot as p

How do I find where Python's libpython is located?

I'm using Conda on macOS, and I'm getting an error while building a Rust package that it can't find the libpython3.7m.dylib library. How can I find this? After

if class not found return none in beatifulSoup

I'm trying to get None if the class is not found in web scraping. For example, in some cases stage-codes.html#10_99 doesn't exist in HTML. for st in soup.find_a

Can't get looping through regex list to work

import re othello_full = open('C:/Users/.../Othello.txt', encoding="mbcs").read() split_dialogue = othello_full.split("\n\n") dict = {} for i in split_dialo

How to make a dictionary of dictionaries with same keys in a loop [duplicate]

Hello i'm new to python and i'm trying to make a dictionary that can contain multiple dictionaries (depending on how many the user wants) and

Getting rid of elements in array n1, if the element exists in array n2

I have 2 arrays. I want to get rid of elements in array n1 if the element exists in array n2. I already have a solution, but it is not so efficient since it use

My code doesn't print what I want it to print

If the number is 1 want it to print 1 is a number but instead it prints <function num> is a number. How do I fix this? def num(): int(input("number: "))

What is the difference between the Conda packages nvidia::cudatoolkit and nvidia::cuda-toolkit?

cudatoolkit has metadata and a description, and seems to be widely referenced in various installation guides for different libraries, e.g. pytorch.cuda-toolkit

Selenium: Message: invalid selector: An invalid or illegal selector was specified

I'm trying to web scrape using selenium an NFT, website Magic Eden. When I try and scrape normal data like text on top of the page my code works fine, but when

Merge column into one string from 2D list

I want to merge one column into one string from 2D list. Are there better ways to merge it? lists = [['H', 'W'], ['e', 'o'], ['l', 'r'], ['l', 'l'], ['o','d']]

I am getting a "'NoneType' object is not subscriptable" when trying to bring in data from a URL

Here is my code: #Import libraries import os import pandas as pd import requests import matplotlib.pyplot as plt import numpy as np from datetime import date im