[Solved] TypeError: xx takes 1 positional argument but 4 were given

The problem is that there is an error when the thread transmits data. For example, the following sentence will report an error when it runs

threading.Thread(target=intent, args=([1, 2, 3, 4])).start()

The solution is to add a comma to the last face, as follows

    threading.Thread(target=intent, args=([1, 2, 3, 4],)).start()
    # or
    threading.Thread(target=intent, args=[[1, 2, 3, 4], ]).start()


Read More: