I got 99 problems and now a pickle is one!
Getting:
MaybeEncodingError: Error sending result: '[<backtrader.cerebro.OptReturn object at 0x7f02b6787080>]'. Reason: 'PicklingError("Can't pickle <function <lambda> at 0x7f02ec32f620>: attribute lookup <lambda> on jupyter_client.session failed",)'
This is using the package backtrader
, and I suspect it has something to do with multithreading, although I'm certainly not advanced enough to know!
This problem does not happen when I'm running this same code on my laptop.
Full traceback:
MaybeEncodingError Traceback (most recent call last)
<ipython-input-6-1a90ce74d998> in <module>()
----> 1 opt_runs = cerebro.run()
/home/tjw0000/.local/lib/python3.6/site-packages/backtrader/cerebro.py in run(self, **kwargs)
1141
1142 pool = multiprocessing.Pool(self.p.maxcpus or None)
-> 1143 for r in pool.imap(self, iterstrats):
1144 self.runstrats.append(r)
1145 for cb in self.optcbs:
/usr/lib/python3.6/multiprocessing/pool.py in next(self, timeout)
697 if success:
698 return value
--> 699 raise value
700
701 __next__ = next # XXX
Thanks for any help!