Python Forum
TypeError: Method takes takes exactly 1 argument but 2 given
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: Method takes takes exactly 1 argument but 2 given
#2
Run doesn't take any arguments and is not called directly, the start methods invokes run.


https://docs.python.org/2/library/thread...read.start Wrote:Start the thread’s activity.
It must be called at most once per thread object. It arranges for the object’s run() method to be invoked in a separate thread of control.
This method will raise a RuntimeError if called more than once on the same thread object.

https://docs.python.org/2/library/thread...Thread.run Wrote:Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
Reply


Messages In This Thread
RE: TypeError: Method takes takes exactly 1 argument but 2 given - by Yoriz - Dec-15-2016, 07:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: to_capabilities() missing 1 required positional argument: 'self' OceansBlue 2 5,281 Dec-03-2020, 12:08 AM
Last Post: OceansBlue
  TypeError: missing 1 required positional argument (word counter Django app) Drone4four 2 14,607 Jul-11-2019, 09:34 PM
Last Post: Drone4four
  TypeError("index() missing 1 required positional argument: 'pymydb'" nikos 2 4,260 Mar-03-2019, 09:21 PM
Last Post: micseydel
  TypeError: get_names() takes 0 positional arguments but 1 was given Truman 2 10,205 Aug-15-2018, 10:32 PM
Last Post: Truman

Forum Jump:

User Panel Messages

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