CoCalc -- Collaborative Calculation in the Cloud
Sharedsupport / 2015-02-07-100301 multiprocessing fail.sagewsOpen in CoCalc

Examples for support purposes...

%python
import multiprocessing as mp
def cube(x):
    return x**3
pool = mp.Pool()
pool.map(cube, range(1, 10))
Error in lines 5-5 Traceback (most recent call last): File "/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/.sagemathcloud/sage_server.py", line 873, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/usr/local/sage/sage-6.4/local/lib/python/multiprocessing/pool.py", line 251, in map return self.map_async(func, iterable, chunksize).get() File "/usr/local/sage/sage-6.4/local/lib/python/multiprocessing/pool.py", line 558, in get raise self._value TypeError: expected string or Unicode object, NoneType found