https://dagster.io/ logo
#ask-community
Title
# ask-community
c

chrispc

03/29/2022, 4:48 PM
Hi team, I am trying to execute a job that has notebook op using dagstermill. I can execute this from dagit successfully but using the python API, I am getting this error
dagstermill.errors.DagstermillError: Can't execute a dagstermill op from a job that is not reconstructable. Use the reconstructable() function if executing from python
what does this mean? Thank you a lot
o

owen

03/29/2022, 4:50 PM
cc @yuhan
c

chrispc

03/29/2022, 6:49 PM
Thank you!! @alex
Hi @alex I am trying to set this reconstrutable but I can’t do that. I am not completely sure how to execute this using python API and how to add this one to dagit. If I execute this one using the python API
Copy code
appl_price.execute_in_process(run_config=test_config.get_preset(name_preset='json_manager',
                                                                name_yaml='APPL.yaml').run_config)
I get: Traceback (most recent call last):
  File "/Users/…/PycharmProjects/Data_application_template/project_dataML/main.py", line 10, in <module>
    appl_price.execute_in_process(run_config=test_config.get_preset(name_preset='json_manager',
AttributeError: 'ReconstructablePipeline' object has no attribute 'execute_in_process'
a

alex

03/30/2022, 2:59 PM
ah sorry, you have to use
execute_pipeline
here
execute_pipeline(reconstructable(appl_price), run_config=...)
c

chrispc

03/30/2022, 4:02 PM
@alex thank you, It will nice to put this in the docs. With the latest version, it is a little confusing when to use the old API (If i am not wrong,
execute
was thought for pipeline) and the new one (
jobs/graphs
)
a

alex

03/30/2022, 4:03 PM
ya were hoping to come up with a better replacement for the new APIs that doesn’t involve having to confront this
reconstructable
stuff
condagster 1
y

yuhan

06/17/2022, 7:14 PM
@Dagster Bot discussion Execute dagstermill op in Python
d

Dagster Bot

06/17/2022, 7:14 PM
Question in the thread has been surfaced to GitHub Discussions for future discoverability: https://github.com/dagster-io/dagster/discussions/8465