RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
在运行代码时出现这个问题:
原因是代码里使用了多线程。
解决办法就是把多线程用main函数包起来,因为多线程需要在main函数里运行,即:
def main():
#函数外的其他代码
if __name__ == '__main__':
main()
问题解决。