Python Forum
[Tkinter] MultiThreading Return value issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] MultiThreading Return value issue
#2
(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.
Reply


Messages In This Thread
MultiThreading Return value issue - by AvisPaul1 - Nov-01-2019, 08:51 PM
RE: MultiThreading Return value issue - by nilamo - Nov-01-2019, 09:16 PM
RE: MultiThreading Return value issue - by Denni - Nov-04-2019, 05:00 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020