mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-14 05:56:40 +00:00
fix(utils): return empty list when ValueError is thrown on inspect.getclosurevars
This commit is contained in:
@@ -423,7 +423,7 @@ def get_function_nonlocals(func: Callable) -> list[Any]:
|
||||
else:
|
||||
values.append(vv)
|
||||
return values
|
||||
except (SyntaxError, TypeError, OSError, SystemError):
|
||||
except (SyntaxError, TypeError, ValueError, OSError, SystemError):
|
||||
return []
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user