Category "python-3.x"

I'm having trouble with pasting a gif on an image using PIL

from PIL import Image, ImageSequence import PIL GIF_PATH = Image.open(r"C:\Users\me_\My\Filw\Path.gif") IMAGE_PATH = Image.open(r"base.png") frames = [] for fr

Formating a string to keep the wanted

I have an issue with this code: from netmiko import ConnectHandler from re import search lsite=[] try: NetworkDevice = { "host" : "ip", "u

Why I'm getting "UnicodeEncodeError: 'charmap' codec can't encode character '\u25b2' in position 84811: character maps to <undefined>" error?

I'm getting UnicodeEncodeError: 'charmap' codec can't encode character '\u200b' in position 756: character maps to error while running this code:: from bs4 imp

How to convert 10 digits with this format XXX-XXX-XXXX to US formal format that looks like (XXX) XXX-XXXX using Python3 Regex sub

This is my try, it actually put the first and seconds groups of 3 digits between parenthesis while I only need to put the first group only between parenthesis

python-selenium.common.exceptions.WebDriverException: Message: Unknown error

I'm up with python 3.8 and selenium but recently I downloaded the latest edge web driver zip file and runned the mswdedriver.exe from that and typed this code i

How do i import another turtle in python

im studying coding in bugaria in highschool. Im in 8th grade, and were studying python and processing. Since the end of this schoolyear is near, our python tea

Call function with a click of a button flask

Im very new to flask and im trying to convert a python tkinter gui app to web. As you can understand i have all the functions made so it would be great if a cou

How can I get size of file while downloading it in Python

How can I get size of file while downloading it in Python so that I can show downloaded size and pending size of file to download? if file size is 2GB and 700mb

No module named 'gspread'

Below file runs successfully when run direct on the console, but give an error: No module named 'gspread' on server import gspread from oauth2client.service_acc

How can I restrict a Telegram bot's use to some users only?

I'm programming a Telegram bot in python with the python-telegram-bot library for python3.x It's a bot for private use only (me and some relatives), so I would

Why pip does not install a package?

pip install indicates that the nitime package was successfully installed but it is not. Why is this? $ pip3 install nitime Defaulting to user installation becau

problem in reading products CSV file with pandas python

I have products CSV file and I am trying to read this file with pandas python but i get this error my code import pandas as pd df = pd.read_csv('D:\\work\\am

Same x-ticks for all subplots in matplotlib

Though this question has already been asked, but I am unable to implement that. I don't know how get the xticks for each subplot and then replace it with the ne

Same x-ticks for all subplots in matplotlib

Though this question has already been asked, but I am unable to implement that. I don't know how get the xticks for each subplot and then replace it with the ne

"codec can't encode character" error when I run "pipx install eth-brownie"

Not sure if this helps but I couldn't run "python3 -m pip install --user pipx" and "python3 -m pipx ensurepath". Instead of "python3" I just used "python" and a

Python unit test cannot find module [duplicate]

I have a question about how to correctly import module in python unit test module. this is my directory structure project - | _ Libra

How to show xticks for all 365 distinct tick labels on the X-axis using matplotlib?

I have plotted two line plots. For Y-axis as the number of values are less, the Y-axis is clearly visible. However, for X-axis there are 365 values correspondin

Discord.py: How to fix "event loop is closed"

I am new to programming. I am trying to have my discord bot open up command prompt to confirm it can run, but I am getting this error: File "C:\Users\---\Ap

efficient way of computing a list with mean of values in another list

I need to compute a list with the mean values of another list. To be more precise, the input list have this form: input_list = ['1.538075/42.507325', '1.53796

Weird Python Log Error while trying to reinstall Python on Windows 11

I installed Python on Windows 11 normally after getting the setup from python.org but, by mistake, I deleted the partition Python was installed in (it was E dri