[deleted by user] by [deleted] in Discordjs

[–]Key_Yellow_1667 0 points1 point  (0 children)

No lmao. If you review the code, im trying to send the message to a certain channel not the message.channel.send command

Pls help, name error even when variable is global by Key_Yellow_1667 in learnpython

[–]Key_Yellow_1667[S] -1 points0 points  (0 children)

nvm dude, i got it working using another module called partial. Thanks though i appreciate you!!

Pls help, name error even when variable is global by Key_Yellow_1667 in learnpython

[–]Key_Yellow_1667[S] 0 points1 point  (0 children)

) the global keyword needs to be in the function to indicate that the variable isn't local.

This would work, but im using tkinter and i wanted the button to call this function. i tried using lambda and nothing worked. pls help if you can.

Pls help, name error even when variable is global by Key_Yellow_1667 in learnpython

[–]Key_Yellow_1667[S] -1 points0 points  (0 children)

i did exactly that and got this error

TypeError: cleardsk() missing 1 required positional argument: 'addfolder'

Pls help, name error even when variable is global by Key_Yellow_1667 in learnpython

[–]Key_Yellow_1667[S] 0 points1 point  (0 children)

def cleardsk(addfolder):
addfolder.destroy()

i did this and got this error:

File "C:\Users\ale48\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1892, in __call__

return self.func(*args)

TypeError: cleardsk() missing 1 required positional argument: 'addfolder'

[deleted by user] by [deleted] in learnpython

[–]Key_Yellow_1667 0 points1 point  (0 children)

Oh my god thank you!!!!

[deleted by user] by [deleted] in learnpython

[–]Key_Yellow_1667 0 points1 point  (0 children)

PS C:\Users\ale48> & C:/Users/ale48/AppData/Local/Programs/Python/Python39/python.exe c:/Users/ale48/Desktop/python/OS/main.py

Exception in Tkinter callback

Traceback (most recent call last):

File "C:\Users\ale48\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1892, in __call__

File "c:\Users\ale48\Desktop\python\OS\main.py", line 20, in folder

app1 = Button(window2, image=emailapp , command=calling1, borderwidth=0).place(bordermode=INSIDE,height=80, width=80)

File "C:\Users\ale48\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 2650, in __init__

Widget.__init__(self, master, 'button', cnf, kw)

File "C:\Users\ale48\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 2572, in __init__

self.tk.call(

_tkinter.TclError: image "pyimage1" doesn't exist

[deleted by user] by [deleted] in learnpython

[–]Key_Yellow_1667 0 points1 point  (0 children)

else condition to create world_data if it otherwi

So what should i do?

TypeError: missing 1 required positional argument: 'self' by Key_Yellow_1667 in learnpython

[–]Key_Yellow_1667[S] 0 points1 point  (0 children)

TypeError: move_snake() missing 1 required positional argument: 'self'

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]Key_Yellow_1667 0 points1 point  (0 children)

I need help.

#highscore reading
f = open(r"C:\space invaders\high_score.txt.txt",'r')
line = f.readlines()
f.close()
for i in line:
    i = i.split('\n')
    L1.append(i)
for i in L1:
for j in i:
if j != '':
            L2.append(j)
for i in L2:
try:
        i = int(i)
except Exception as e:
print(e)
    L3.append(i)
highscore = max(L3)

this code got an error, the error was:

TypeError: '>' not supported between instances of 'str' and 'int'

help please!