Category "python"

Django - Form not saving when submitted

Good afternoon all, One of my form does not seem to save when submitted. I cannot see why, in particular as I have a similar form working just fine using the sa

Сommand tox -r doesn't deploy venv python in project

I have some project, that on my local pc by windows correct work. When I copy this project through gitlab on server, I don't see some folders. So, tox -r comman

pycord says "TypeError: object TextChannel can't be used in 'await' expression"

I use Pycord, and when I use channel = bot.get_channel(975050208264200242) with await channel.send(embed = embed2) to send message it says me TypeError: object

How does a fernet key work and how to store it safely (Python)?

I am experimenting with Fernet from Cryptography module in Python and encountered certain heavy terms I was not able to understand, despite clear and good docum

how to swicth to a metamask pop up in chrome with a python selenium script

i am on rarible.com minting a nft with metamask i go threw the hole process then in the chrome browser a metamask pop up appears to click confirm the transactio

Check all members custom status instead of just my custom status

How could I change this command to check the custom status of all the members in the server instead of just checking the custom status of the person that wrote

Python-pptx, find special text and replace with image

I'm trying to replace text in PowerPoint slides with an image. For example, if I find <graph1> I would like to replace that text with the picture "picture

(Python) Fill the column by webscraping the data on the website. Getting an error: UnicodeError: label empty or too long

I have a dataset that looks like this: ID Link 1 'https://wwwexamplecom/hello/details-5565558html' 2 'https://wwwexamplecom/hello/details-5489292html' 3 'https

Change object data type to float data type

I read the .cvs file, which dataframe is named "df". But because I want to focus in one row I renamed my dataframe to "br". My problem is that I'm trying to con

How to Merge two datasets with different indexes but one common ID factor?

I am working with two distinct datasets: one regarding COVID-19 statistics and one with demographic characteristics of a city. The covid19 one, namely covid.df

Pytorch transfer learning accuracy and lossess not improving. Resnet 50 and Cifar-10

I have been trying everything to fix this issue however my results are still the same, my validation accuracy, train_loss, val_loss are not improving. I have no

Assigning empty list

I don't really know how I stumbled upon this, and I don't know what to think about it, but apparently [] = [] is a legal operation in python, so is [] = '', but

Problem Running Azure Durable Function in parallel

I am trying to run each API call to my Azure Durable Function in parallel. It works fine with executing just a single call, but when I get multiple calls at onc

How to send a message in a newly created discord channel

What im trying to do is make a command that creates a new channel. The problem is that the channel doesnt create and gives an error. newChannel = client.create_

How can I iterate a for loop in Python in the increments of sum of another variable and iterator

I am trying to make a python program for "The Sieve Of Eratosthenes" but I am stuck at one place. The c program I wrote looks something like this : for (i = 2;

StableBaselines-3 DDPG + HER Multiprocessing

I was reading documentation about HER and also about Multiprocessing in stable-baselines3 website However when i try to train it throws a error! Is there any ex

Is there any way to kill a Thread?

Is it possible to terminate a running thread without setting/checking any flags/semaphores/etc.?

Is there any use for the pg_type type?

Is there any real world use for the type pg_type, i.e type ids 71 and 210. Although it's a bit of a faff, queries can result in this type output, as in the belo

Python list slicing not working correctly [duplicate]

I have recently started learning python. After learning list slicing, I thought of trying it out. But when I am using -1, it's returning an em

Utilizing GPU fails with tensorflow and CUDA with process finished with exit code -1073740791 (0xC0000409)

I try to use my GPU for the first time to run a model with Tensorflow it exits whenever training starts with message: Epoch 1/15 2022-05-07 00:46:23.749793: I t