pyiron / pyiron/executorlib

[Documentation] ExecutorBase.submit() missing 1 required positional argument: 'fn'

Open
#654 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Python
Stars
77
Forks
7
Avg merge
10h 32m
Merged PRs (30d)
12

Description

When the function is set explicitly in the submit() function executorlib raises and error message:

ExecutorBase.submit() missing 1 required positional argument: 'fn'

For example:

import executorlib

def sum_funct(a,b):
    return sum([a, b])

with executorlib.SingleNodeExecutor() as exe:
    f = exe.submit(fn=sum_funct, a=1, b=2)
    print(f.result())

This behavior is consistent with the concurrent.futures.ThreadPoolExecutor which raises a similar error message:

from concurrent.futures import ThreadPoolExecutor

def sum_funct(a,b):
    return sum([a, b])

with ThreadPoolExecutor() as exe:
    f = exe.submit(fn=sum_funct, a=1, b=2)
    print(f.result())

Raises:

TypeError: ThreadPoolExecutor.submit() missing 1 required positional argument: 'fn'

Still there were older versions of executorlib<=1.0.1 which did not raise this error message.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the documentation for ExecutorBase.submit() and compare its documented calling convention with the example in the issue and Python's concurrent.futures behavior. Confirm whether the current error is expected and clarify the documented usage or compatibility note accordingly. Done means the submit() behavior and the older-version difference are clearly explained.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.