Missing Argument Error For .get Method Of Tkinter Text Entry Widget
I am attempting to run the following code for a text editor. def newfile(): current = None def create_file(entry): nonlocal current current = open(entry.get(),'w') e.ma
Solution 1:
An instance of the Entry widget does not require any arguments for the get
method. You are calling it correctly. Neither does the standard open
command require an integer. My guess is, one of entry
or open
is not what you think it is. Maybe you have a method or another object with one of those names?
I suggest putting the call to get
and the open on separate lines, to make sure you know which part of that statement is throwing the error:
text = entry.get()
current = open(text, 'w')
Post a Comment for "Missing Argument Error For .get Method Of Tkinter Text Entry Widget"