Python Forum
Missing 1 required position argument: 'failure' while starting thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing 1 required position argument: 'failure' while starting thread.
#1
Error:
TypeError: scrape_child_link() missing 1 required positional argument: 'failure'
When I get to the following part in my code the above happens.
class A(object):
    def start(self):
        ....
        kill = threading.Event()
        # starting here
        child_link_thread = threading.Thread(target=ThreadExecutioner.execute_child,args=(self.scrape_child_link, child_link_queue, self.site, code_io_handle, text_io_handle, kill)).start()
        ....
    @staticmethod
    def scrape_child_link(self, link: str, used_children: Queue, site: StackOverflow, code_io_handle, text_io_handle,failure: threading.Event):
        ....
    

class ThreadExecutioner():
    @staticmethod
    def execute_child(target: callable(object), tasks: Queue, site: source, code_io_handle, text_io_handle,kill: threading.Event):
        parent_threader = threading.Thread(target=target,args=(task, hit_queue, site, code_io_handle,text_io_handle, kill),daemon=True)
        parent_threader.start() #Exception thrown here
    
Ive stepped through this and all of the variables are set by the time the second thread is dispatched. But for some reason the thread does not recognize the kill variable
Reply


Messages In This Thread
Missing 1 required position argument: 'failure' while starting thread. - by BradLivingstone - Jun-17-2020, 10:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Failure to run source command middlestudent 2 711 Sep-22-2023, 01:21 PM
Last Post: buran
  Dickey Fuller failure Led_Zeppelin 4 2,650 Sep-15-2022, 09:07 PM
Last Post: Led_Zeppelin
  TypeError: missing a required argument: 'y' gible 0 2,927 Dec-15-2021, 02:21 AM
Last Post: gible
  Assert failure jtcostel 1 1,655 Sep-03-2021, 05:28 PM
Last Post: buran
  TypeError: missing 3 required positional arguments: wardancer84 9 10,943 Aug-19-2021, 04:27 PM
Last Post: deanhystad
  TypeError: run_oracle_job() missing 1 required positional argument: 'connection_strin python_student 1 1,979 Aug-06-2021, 08:05 PM
Last Post: SheeppOSU
  TypeError: max_value() missing 2 required positional arguments: 'alpha' and 'beta' Anldra12 2 4,228 May-15-2021, 04:15 PM
Last Post: Anldra12
  TypeError: sum() missing 1 required positional argument: 'num2' Insen 3 5,489 Jan-06-2021, 04:25 PM
Last Post: Insen
  TypeError: forward() missing 1 required positional argument: 'x' sveto4ka 4 12,324 Jun-17-2020, 07:25 PM
Last Post: sveto4ka
  missing 1 required positional argument: 'self' yasser 7 11,515 Jun-07-2020, 06:48 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

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