Skip to content

[Bug] When pysqa is not installed #673

@jan-janssen

Description

@jan-janssen

The following example from the documentation gives a cryptic error message:

def add_funct(a, b):
    return a + b


from executorlib import FluxClusterExecutor

with FluxClusterExecutor(cache_directory="./file") as exe:
    future = 0
    for i in range(4, 8):
        future = exe.submit(add_funct, i, future)
    print(future.result())

The error message is:

Exception in thread Thread-5 (execute_tasks_h5):
Traceback (most recent call last):
  File "/srv/conda/envs/notebook/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/srv/conda/envs/notebook/lib/python3.12/site-packages/ipykernel/ipkernel.py", line 766, in run_closure
    _threading_Thread_run(self)
  File "/srv/conda/envs/notebook/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/srv/conda/envs/notebook/lib/python3.12/site-packages/executorlib/task_scheduler/file/shared.py", line 131, in execute_tasks_h5
    process_dict[task_key] = execute_function(
                             ^^^^^^^^^^^^^^^^^
  File "/srv/conda/envs/notebook/lib/python3.12/site-packages/executorlib/task_scheduler/file/subprocess_spawner.py", line 48, in execute_in_subprocess
    raise ValueError("backend parameter is not supported for subprocess spawner.")
ValueError: backend parameter is not supported for subprocess spawner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions