https://flyte.org logo
#ask-the-community
Title
# ask-the-community
e

Eduardo Matus

02/20/2023, 3:40 PM
Hi everyone… getting a ‘NoneType’ object has no attribute ‘inputs’ trying to execute a launch plan. the workflow doesn’t have inputs parameters. any ideas?
Copy code
from 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)
y

Yee

02/20/2023, 5:30 PM
do you have a stacktrace?
k

Kevin Su

02/20/2023, 5:41 PM
Copy code
/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'
Related to this, the LP’s python_interface is none
e

Eduardo Matus

02/20/2023, 6:13 PM
@Yee Here is:
Copy code
Traceback (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'
y

Yee

02/21/2023, 4:58 PM
will take a look at this today
k

Kevin Su

02/21/2023, 10:09 PM
I have a pr for it.
65 Views