Hi everyone… getting a ‘NoneType’ object has no at...
# ask-the-community
e
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
do you have a stacktrace?
k
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
@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
will take a look at this today
k
I have a pr for it.
152 Views