We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related joblib bug: joblib/joblib#863
from loky import get_reusable_executor def func_with_kw_only_args(a, *, b=1): return a + b executor = get_reusable_executor(max_workers=2) res = executor.submit(func_with_kw_only_args, 1) print("Got results:", res.result())
Traceback:
--------------------------------------------------------------------------- _RemoteTraceback Traceback (most recent call last) _RemoteTraceback: """ Traceback (most recent call last): File "/home/local/lesteve/dev/loky/loky/process_executor.py", line 418, in _process_worker r = call_item() File "/home/local/lesteve/dev/loky/loky/process_executor.py", line 272, in __call__ return self.fn(*self.args, **self.kwargs) TypeError: func_with_kw_only_args() missing 1 required keyword-only argument: 'b' """ The above exception was the direct cause of the following exception: TypeError Traceback (most recent call last) <ipython-input-12-ec20eabd887b> in <module> 9 10 res = executor.submit(func_with_kw_only_args, 1) ---> 11 print("Got results:", res.result()) 12 /home/local/lesteve/miniconda3/lib/python3.7/concurrent/futures/_base.py in result(self, timeout) 430 raise CancelledError() 431 elif self._state == FINISHED: --> 432 return self.__get_result() 433 else: 434 raise TimeoutError() /home/local/lesteve/miniconda3/lib/python3.7/concurrent/futures/_base.py in __get_result(self) 382 def __get_result(self): 383 if self._exception: --> 384 raise self._exception 385 else: 386 return self._result TypeError: func_with_kw_only_args() missing 1 required keyword-only argument: 'b'
The text was updated successfully, but these errors were encountered:
Note: putting the function with keyword-only arguments in a module works, so I am guessing the bug lies in the magic to pickle the __main__ namespace.
__main__
Sorry, something went wrong.
I opened a bug in cloudpickle since this is very likely where the root problem lies: cloudpipe/cloudpickle#263
cloudpipe/cloudpickle#264 was merged and released in cloudpickle 1.2.0, so I assume this can be closed as well.
No branches or pull requests
Related joblib bug: joblib/joblib#863
Traceback:
The text was updated successfully, but these errors were encountered: