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

Nested WorkGraph: Error in loading executor: a bytes-like object is required, not 'NoneType #285

Closed
agoscinski opened this issue Aug 28, 2024 · 0 comments · Fixed by #292
Labels
bug Something isn't working

Comments

@agoscinski
Copy link
Contributor

Code

from aiida_workgraph import task, WorkGraph
from aiida.orm import Int

# define add task
@task.calcfunction()
def add(x, y):
    return x + y

# define multiply task
@task.calcfunction()
def multiply(x, y):
    return x * y

def add_multiply(x, y, z):
    wg = WorkGraph()
    wg.add_task(add, name="add", x=x, y=y)
    wg.add_task(multiply, name="multiply", x=z)
    wg.add_link(wg.tasks["add"].outputs[0], wg.tasks["multiply"].inputs["y"])
    return wg

wg = WorkGraph("nested_workgraph")
task1 = wg.add_task(add_multiply(x=Int(2), y=Int(3), z=Int(4)))
display(wg.to_html())
wg.run()

This code runs, but returns

Report: [294|WorkGraphEngine|continue_workgraph]: Continue workgraph.                   
Report: [294|WorkGraphEngine|continue_workgraph]: tasks ready to run: WorkGraph1        
------------------------------------------------------------                            
Report: [294|WorkGraphEngine|run_tasks]: Run task: WorkGraph1, type: workgraph          
Error in loading executor:  a bytes-like object is required, not 'NoneType'             
Report: [294|WorkGraphEngine|on_wait]: Process status: Waiting for child processes: 295 
Report: [295|WorkGraphEngine|continue_workgraph]: Continue workgraph.                   
Report: [295|WorkGraphEngine|continue_workgraph]: tasks ready to run: add               
... (then everything works fine)

What is the cause for?

Error in loading executor:  a bytes-like object is required, not 'NoneType'             
@agoscinski agoscinski changed the title Error in loading executor: a bytes-like object is required, not 'NoneType Nested WorkGraph: Error in loading executor: a bytes-like object is required, not 'NoneType Aug 28, 2024
@superstar54 superstar54 linked a pull request Sep 5, 2024 that will close this issue
@superstar54 superstar54 added the bug Something isn't working label Sep 5, 2024
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.

2 participants