Skip to content

max_workers issue #23

@j3lmer

Description

@j3lmer

I tried running the script as per the docs and kept getting the following error:
Traceback (most recent call last):
File "/home/j3lmer/Applications/snapchatmemories/SnapchatMemoriesCaptionAdder/main.py", line 130, in
main()
File "/home/j3lmer/Applications/snapchatmemories/SnapchatMemoriesCaptionAdder/main.py", line 55, in main
for res in process_map(
^^^^^^^^^^^^
File "/home/j3lmer/Applications/snapchatmemories/SnapchatMemoriesCaptionAdder/lib/python3.12/site-packages/tqdm/contrib/concurrent.py", line 105, in process_map
return _executor_map(ProcessPoolExecutor, fn, *iterables, **tqdm_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j3lmer/Applications/snapchatmemories/SnapchatMemoriesCaptionAdder/lib/python3.12/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map
return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/j3lmer/Applications/snapchatmemories/SnapchatMemoriesCaptionAdder/lib/python3.12/site-packages/tqdm/std.py", line 1181, in iter
for obj in iterable:
File "/usr/lib/python3.12/concurrent/futures/process.py", line 642, in _chain_from_iterable_of_lists
for element in iterable:
File "/usr/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator
yield _result_or_cancel(fs.pop())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel
return fut.result(timeout)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

adding max_workers=2 in the for loop around line 55 seemed to have fixed it

I am using python3 in a venv (not very familiar with python) if that matters

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions