-
Notifications
You must be signed in to change notification settings - Fork 19
TypeError: 'NoneType' object cannot be interpreted as an integer in documentation build #317
Copy link
Copy link
Closed
Labels
Description
See this docs build.
Related:
- multiprocessing Manager error: send() called for a closed connection python/cpython#71936 (comment)
- gh-71936: Fix race condition in multiprocessing.Pool python/cpython#98274 (comment)
Full traceback:
---------------------------------------------------------------------------
_RemoteTraceback Traceback (most recent call last)
_RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/bas.nijholt/micromamba/envs/pipefunc/lib/python3.12/concurrent/futures/process.py", line 263, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bas.nijholt/micromamba/envs/pipefunc/lib/python3.12/concurrent/futures/process.py", line 212, in _process_chunk
return [fn(*args) for args in chunk]
^^^^^^^^^
File "/home/bas.nijholt/repos/pipefunc/pipefunc/_pipeline.py", line 1304, in call_with_dict
return self(**kwargs)
^^^^^^^^^^^^^^
File "/home/bas.nijholt/repos/pipefunc/pipefunc/_pipeline.py", line 1274, in __call__
return self.pipeline.run(output_name=self.output_name, kwargs=kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bas.nijholt/repos/pipefunc/pipefunc/_pipeline.py", line 490, in run
self._run(
File "/home/bas.nijholt/repos/pipefunc/pipefunc/_pipeline.py", line 422, in _run
return_now, result_from_cache = _get_result_from_cache(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bas.nijholt/repos/pipefunc/pipefunc/_pipeline.py", line 1398, in _get_result_from_cache
if cache_key is not None and cache_key in cache:
^^^^^^^^^^^^^^^^^^
File "/home/bas.nijholt/repos/pipefunc/pipefunc/_cache.py", line 316, in __contains__
return key in self._cache_dict
^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in __contains__
File "/home/bas.nijholt/micromamba/envs/pipefunc/lib/python3.12/multiprocessing/managers.py", line 820, in _callmethod
conn.send((self._id, methodname, args, kwds))
File "/home/bas.nijholt/micromamba/envs/pipefunc/lib/python3.12/multiprocessing/connection.py", line 206, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/home/bas.nijholt/micromamba/envs/pipefunc/lib/python3.12/multiprocessing/connection.py", line 427, in _send_bytes
self._send(header + buf)
File "/home/bas.nijholt/micromamba/envs/pipefunc/lib/python3.12/multiprocessing/connection.py", line 384, in _send
n = write(self._handle, buf)
^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object cannot be interpreted as an integer
"""
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
Cell In[1], line 19
17 with ProcessPoolExecutor(max_workers=1) as executor:
18 results = executor.map(func.call_with_dict, sequence)
---> 19 list(results)
File ~/micromamba/envs/pipefunc/lib/python3.12/concurrent/futures/process.py:642, in _chain_from_iterable_of_lists(iterable)
636 def _chain_from_iterable_of_lists(iterable):
637 """
638 Specialized implementation of itertools.chain.from_iterable.
639 Each item in *iterable* should be a list. This function is
640 careful not to keep references to yielded objects.
641 """
--> 642 for element in iterable:
643 element.reverse()
644 while element:
File ~/micromamba/envs/pipefunc/lib/python3.12/concurrent/futures/_base.py:619, in Executor.map.<locals>.result_iterator()
616 while fs:
617 # Careful not to keep a reference to the popped future
618 if timeout is None:
--> 619 yield _result_or_cancel(fs.pop())
620 else:
621 yield _result_or_cancel(fs.pop(), end_time - time.monotonic())
File ~/micromamba/envs/pipefunc/lib/python3.12/concurrent/futures/_base.py:317, in _result_or_cancel(***failed resolving arguments***)
315 try:
316 try:
--> 317 return fut.result(timeout)
318 finally:
319 fut.cancel()
File ~/micromamba/envs/pipefunc/lib/python3.12/concurrent/futures/_base.py:456, in Future.result(self, timeout)
454 raise CancelledError()
455 elif self._state == FINISHED:
--> 456 return self.__get_result()
457 else:
458 raise TimeoutError()
File ~/micromamba/envs/pipefunc/lib/python3.12/concurrent/futures/_base.py:401, in Future.__get_result(self)
399 if self._exception:
400 try:
--> 401 raise self._exception
402 finally:
403 # Break a reference cycle with the exception in self._exception
404 self = None
TypeError: 'NoneType' object cannot be interpreted as an integer
Reactions are currently unavailable