Skip to content

Commit

Permalink
Adds fix for unavailable source code in notebook
Browse files Browse the repository at this point in the history
TBD why this is happening, but this is OK for now.
  • Loading branch information
elijahbenizzy committed Nov 19, 2024
1 parent 9a45cc9 commit 7f2f1fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion burr/core/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ def get_source(self) -> str:
the source code of the class in which the action is implemented,
but can be overwritten." Override if you want debugging/tracking
to display a different source"""
return inspect.getsource(self.__class__)
try:
return inspect.getsource(self.__class__)
except Exception:
return "No source available"

def input_schema(self) -> Any:
"""Returns the input schema for the action.
Expand Down

0 comments on commit 7f2f1fd

Please sign in to comment.