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

Ryuu

01/18/2024, 3:00 AM
I want to trace where the line of code print this msg error. I have try to search all project Flytekit with keyword 'doesn't match expected type', But it couldn't found anywhere in Flytekit. Can anyone have me this
l

L godlike

01/18/2024, 12:14 PM
Can you share the code?
It seems like type checking error
r

Ryuu

01/18/2024, 12:27 PM
Copy code
from flytekit import task, workflow


@task
def a(input_a: str) -> str:
    return input_a

@task
def b(input_b: str) -> int:
    return len(input_b)

@task
def c(input_c1: str, input_c2: str) -> str:
    return input_c1 + str(input_c2)


# @workflow
# def my_wf_2(a: str = '123', b: str = '234') -> str:
#     output_a = a(input_a=a)
#     output_b = b(input_b=b)
#     output =  c(input_c1=output_a, input_c2=output_b)
#     return '123'
@workflow
def mywf() -> str:
    output_a = a(input_a='123')
    output_b = b(input_b='234')
    output = c(input_c1=output_a, input_c2=output_b)
    return output
@L godlike That's right, my purpose is trace to where the line of code in Flyte print that error
This is type check error
l

L godlike

01/18/2024, 12:29 PM
You can use workflow compiler
Compile
These 2 words to search
I know it exists
I’ve seen it before
r

Ryuu

01/18/2024, 12:31 PM
@L godlike I have search directly in that purple msg error in entire of Flytekit. But i just found
def pretty_print_grpc_error
is related to this print
is this msg report in Flytekit @L godlike
l

L godlike

01/18/2024, 12:33 PM
Search failed to compile workflow
here
k

Kevin Su

01/18/2024, 6:17 PM
this is the error from propeller.
when you register a workflow, flyteadmin will use the compiler in the propeller to compile the workflow
r

Ryuu

01/19/2024, 1:11 AM
thanks u
2 Views