异常1:RuntimeError An attempt has been made to start a new process

一、异常1:RuntimeError: An attempt has been made to start a new process

异常1:RuntimeError An attempt has been made to start a new process

原因:多进程需要在main函数中运行

解决方法1:

​ 加main函数,在main中调用

if __name__ == '__main__':
	main()

解决方法2:

​ num_workers改为0,单进程加载

ers改为0,单进程加载

上一篇:Java IO(2)阻塞式输入输出(BIO)的字节流与字符流


下一篇:azkaban 中对于任务运行日志的处理