rhythmic-lizard-91902
02/20/2023, 3:40 PMfrom flytekit import Email, LaunchPlan
from flytekit.models.core.execution import WorkflowExecutionPhase
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config
remote = FlyteRemote(
config=Config.for_endpoint(endpoint="dns:///flyte.eks.tech"),
default_project="flytesnacks",
default_domain="development",
)
wf = remote.fetch_workflow(name="parent_workflows.workflows.example.my_wf", version="Mh7JCmzuS6MJr2XWw5ST-Q==", project="flytesnacks", domain="development")
print(wf) #prints correctly
lp = LaunchPlan.get_or_create(wf)
print(lp) #prints correctly
execution = remote.execute(lp, inputs={}, execution_name="test lanuch plan", wait=False) #fails here 'NoneType' object has no attribute 'inputs'
print(execution)
thankful-minister-83577
glamorous-carpet-83516
02/20/2023, 5:41 PM/Users/kevin/opt/anaconda3/envs/flytekit-3.7/bin/python /Users/kevin/git/flytekit/flyte-example/example_test.py
{"asctime": "2023-02-20 09:40:48,256", "name": "flytekit", "levelname": "WARNING", "message": "FlyteSchema is deprecated, use Structured Dataset instead."}
<flytekit.core.launch_plan.LaunchPlan object at 0x7fbfd302ec50>
Traceback (most recent call last):
File "/Users/kevin/git/flytekit/flyte-example/example_test.py", line 16, in <module>
execution = remote.execute(lp, inputs={}, execution_name="test lanuch plan", wait=False) #fails here 'NoneType' object has no attribute 'inputs'
File "/Users/kevin/git/flytekit/flytekit/remote/remote.py", line 1116, in execute
overwrite_cache=overwrite_cache,
File "/Users/kevin/git/flytekit/flytekit/remote/remote.py", line 1360, in execute_local_launch_plan
type_hints=entity.python_interface.inputs,
AttributeError: 'NoneType' object has no attribute 'inputs'
glamorous-carpet-83516
02/20/2023, 5:42 PMrhythmic-lizard-91902
02/20/2023, 6:13 PMTraceback (most recent call last):
File "/Users/ematus/test_flyte/flyte_remote.py", line 16, in <module>
execution = remote.execute(lp, inputs={}, execution_name="test lanuch plan", wait=False) #fails here 'NoneType' object has no attribute 'inputs'
File "/opt/homebrew/lib/python3.9/site-packages/flytekit/remote/remote.py", line 1107, in execute
return self.execute_local_launch_plan(
File "/opt/homebrew/lib/python3.9/site-packages/flytekit/remote/remote.py", line 1360, in execute_local_launch_plan
type_hints=entity.python_interface.inputs,
AttributeError: 'NoneType' object has no attribute 'inputs'
thankful-minister-83577
glamorous-carpet-83516
02/21/2023, 10:09 PM