我不断收到错误消息
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())
return
q = queue.Queue()
events = []
controller = threading.Thread(target=get_controller(), args=(q,))
我知道这不是忘记在“args”中的第一个参数后添加“,”的常见错误,但我不确定它还可能是什么。
倚天杖
茅侃侃
相关分类