```Exception occured while compiling function: &lt...
# hamilton-help
d
Copy code
Exception occured while compiling function: <lambda> to nodes
Traceback (most recent call last):
  File "/app/airflow/env/lib/python3.10/site-packages/hamilton/function_modifiers/base.py", line 816, in resolve_nodes
    nodes = node_creator.generate_nodes(fn, filter_config(config, node_creator))
  File "/app/airflow/env/lib/python3.10/site-packages/hamilton/function_modifiers/base.py", line 627, in generate_nodes
    return [node.Node.from_fn(fn)]
  File "/app/airflow/env/lib/python3.10/site-packages/hamilton/node.py", line 281, in from_fn
    raise ValueError(f"Missing type hint for return value in function {fn.__qualname__}.")
ValueError: Missing type hint for return value in function <lambda>.
-------------------------------------------------------------------
Oh no an error! Need help with Hamilton?
Join our slack and ask for help! <https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g>
Hi, how to ignore type hint for lambda
e
Hey! So lambda functions aren’t directly supported. While you can get around type-checking using this, I suspect you’ll hit the next problem which is that the function doesn’t have a proper name (E.G. it’s
<lambda>
, so you can’t wire it in the DAG. Out of curiosity — how are you using the lambda function? Why a lambda instead of a normal function?
d
Ah, I'm using it as a helper function and I just thought it wouldn't become a node like a normal function
e
Ohhh
Yep that’s an interesting one
Mind making it an issue on GitHub? Also try starting the variable name with underscore (not sure it’ll work)
🙌 1
Should be able to guard against it