Category : python

I wanted to write a music bot for our discord with friends, took the code from the lavalink github and changed it a little, but the error is not where I changed it, but in the most obscure place) Error: self.bot.music = lavalink.Client(self.bot.user.id) AttributeError: ‘NoneType’ object has no attribute ‘id’ code from music.py: import os ..

Read more

Create a function that takes any number of functions as positional arguments. The function returns execution of function-arguments one by one. See example for better understanding (Let’s call this function chain). my_func = chain(lambda x: x + 2, lambda x: (x/4, x//4)) my_func(37) It should return (9.75, 9) I tried to do something like: def ..

Read more

def lista(self): self.listaCli.delete(*self.listaCli.get_children()) self.conexao() lista = self.cursor.execute(""" SELECT id_cliente, nome, numero_de_telefone, data_de_entrada, data_de_saida, aparelho, aparelho_esta_na_loja ORDER BY nome ASC""") for i in lista: self.listaCli.insert("", END, values=i) self.conexao.commit() class Application(Funcs): def __init__(self): self.root = root self.tela() self.frames_da_tela() self.widgets_frame1() self.lista_frame2() self.listaCli() root.mainloop() Source: Python..

Read more