我不斷收到錯誤消息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
提交
取消