The inputs library is causing PicklingError. Code to replicate the error is as follows:
from inputs import devices
from pathos import helpers
Process = helpers.mp.Process
def Foo(d):
pass
if __name__ == '__main__':
Process(target=Foo, args=devices).start()
The error raised:
_pickle.PicklingError: Can't pickle <class 'ctypes.CDLL.__init__.<locals>._FuncPtr'>: it's not found as ctypes.CDLL.__init__.<locals>._FuncPtr.
I am unsure which line of inputs code causes it, but there is a following piece of code relevant to the problem in the CDLL class inside ctypes built-in library:
class CDLL(object):
_FuncPtr = None
def __init__(self, (...)):
class _FuncPtr(_CFuncPtr):
_flags_ = flags
_restype_ = self._func_restype_
self._FuncPtr = _FuncPtr
Is it by any chance a lack of dill's support for this type, or more likely an issue with the inputs library? I am using Python 3.6.4.
PS. Thank you for such a quick answer on my question earlier today :)
Issue:
The inputs library is causing
PicklingError
. Code to replicate the error is as follows:The error raised:
_pickle.PicklingError: Can't pickle <class 'ctypes.CDLL.__init__.<locals>._FuncPtr'>: it's not found as ctypes.CDLL.__init__.<locals>._FuncPtr
.I am unsure which line of
inputs
code causes it, but there is a following piece of code relevant to the problem in theCDLL
class insidectypes
built-in library:Is it by any chance a lack of
dill
's support for this type, or more likely an issue with theinputs
library? I am using Python 3.6.4.PS. Thank you for such a quick answer on my question earlier today :)