Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running jobs using -f on command line #737

Closed
tommy-waltmann opened this issue Apr 12, 2023 · 0 comments · Fixed by #738
Closed

Error when running jobs using -f on command line #737

tommy-waltmann opened this issue Apr 12, 2023 · 0 comments · Fixed by #738
Labels
bug Something isn't working

Comments

@tommy-waltmann
Copy link
Contributor

Description

When I use python project.py run -f ... on the command line, flow errors internally.

To reproduce

import signac
from flow import FlowProject

from pathlib import Path

project = signac.get_project(Path(__file__).parent / "SignacProject")

job_sps = [{'a': 1, 'b': 2},
           {'a': 1, 'b': 3}]

for job_sp in job_sps:
    job = project.open_job(job_sp)
    job.init()


class SignacProject(FlowProject):
    pass


@SignacProject.operation
def print_statepoint(job):
    print(job.sp)


if __name__ == "__main__":
    SignacProject.get_project(project.path).main()

Try to run the only job on the command line with

python script.py run -f b 2

Error output

$ python script.py run -f b 2
Using environment configuration: StandardEnvironment
Interpreted filter arguments as '{"b": 2}'.
Traceback (most recent call last):
  File "/Users/tomwalt/scripts/signac/flow-2.0-bug/script.py", line 26, in <module>
    SignacProject.get_project(project.path).main()
  File "/Users/tomwalt/miniconda3/envs/py310/lib/python3.10/site-packages/flow/project.py", line 5132, in main
    args.func(args)
  File "/Users/tomwalt/miniconda3/envs/py310/lib/python3.10/site-packages/flow/project.py", line 4820, in _main_run
    aggregates = self._select_jobs_from_args(args)
  File "/Users/tomwalt/miniconda3/envs/py310/lib/python3.10/site-packages/flow/project.py", line 4908, in _select_jobs_from_args
    return _JobAggregateCursor(self, filter_, doc_filter)
TypeError: _JobAggregateCursor.__init__() takes from 2 to 3 positional arguments but 4 were given

System configuration

Please complete the following information:

  • Operating System [e.g. macOS]: macOS, linux
  • Version of Python [e.g. 3.7]: 3.10.10
  • Version of signac [e.g. 1.0]: 2.0.0
  • Version of signac-flow: 0.25.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant