diff --git a/fennel/CHANGELOG.md b/fennel/CHANGELOG.md index 64ec5542..7d3d4ce1 100644 --- a/fennel/CHANGELOG.md +++ b/fennel/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [1.5.23] - 2024-09-17 +- Fix bug for using lambdas in jupyter notebooks + ## [1.5.22] - 2024-09-12 - Add casting to pyarrow for using expression in assign. diff --git a/fennel/internal_lib/to_proto/source_code.py b/fennel/internal_lib/to_proto/source_code.py index f5586676..858d67bb 100644 --- a/fennel/internal_lib/to_proto/source_code.py +++ b/fennel/internal_lib/to_proto/source_code.py @@ -321,11 +321,18 @@ def check_ambiguous_lambda( """ # Get the next line and append to lambda text next_line = "" - with open(lambda_func.__code__.co_filename, "r") as f: - lines = f.readlines() - if line_num < len(lines): - next_line = lines[line_num].strip() - + try: + with open(lambda_func.__code__.co_filename, "r") as f: + lines = f.readlines() + if line_num < len(lines): + next_line = lines[line_num].strip() + except Exception: + src_code = fennel_get_source(lambda_func) + num_lines = src_code.count("\n") + if num_lines <= 1: + return + next_line = src_code.split("\n")[1] + # No Next line found if next_line == "": return diff --git a/pyproject.toml b/pyproject.toml index 99dda886..43ede538 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fennel-ai" -version = "1.5.22" +version = "1.5.23" description = "The modern realtime feature engineering platform" authors = ["Fennel AI "] packages = [{ include = "fennel" }]