multiprocessing.pool.MaybeEncodingError: Error sending result: '<defaultdict object at 0x7f26ced915e0>'. Reason: 'TypeError("cannot pickle 'defaultdict' object")'
问题描述:
使用pool多进程,返回结果使用get函数读取时报错,
原因:
defaultdict类型,pickle无法序列化,在返回函数中需要对返回结果重新转换为dict()即可
本文来自博客园,作者:海_纳百川,转载请注明原文链接:https://www.cnblogs.com/chentiao/p/17714002.html,如有侵权联系删除