Nov-01-2019, 09:16 PM
(Nov-01-2019, 08:51 PM)AvisPaul1 Wrote: TypeError: Drive_Scanner() takes 2 positional arguments but 4 were given
Your function only has two params: a reference to the object (self), and the DriveLetter. But when the callback is triggered, tkinter is passing extra arguments, which is throwing an error. So the first step, is taking a peek at what else is getting passed, so you can handle it properly.
The easy way of doing so, is adding
*args
to the function definition, and then printing it out so you can see what's there.The second error, about the directory_list, I'd rather see the entire error before commenting on. But it looks like you're trying to use a variable before creating it.