我不断收到错误消息Traceback (most recent call last):File "main.py", line 37, in <module>controller = threading.Thread(target=get_controller(), args=(q,))TypeError: get_controller() missing 1 required positional argument: 'q'每当我尝试在 python 中创建线程时。这是我正在使用的代码def get_controller(q): q.put(get_gamepad())returnq = queue.Queue()events = []controller = threading.Thread(target=get_controller(), args=(q,))我知道这不是忘记在“args”中的第一个参数后添加“,”的常见错误,但我不确定它还可能是什么。
添加回答
举报
0/150
提交
取消