You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because the default value {} of locals overrides the imported packages. Therefore the default value of locals in the class PythonREPL should be None instead of {}
The text was updated successfully, but these errors were encountered:
langchain-experimental/libs/experimental/langchain_experimental/utilities/python.py
Line 48 in 7177f46
This code will fail, with an error:
NameError("name 're' is not defined")
code = """
import re
def return_parts(value):
parts = re.split(r'[,.]', value)
return parts
print(return_parts("100,36"))
"""
python_repl = PythonREPL()
python_repl.run(code)
This is because the default value {} of
locals
overrides the imported packages. Therefore the default value of locals in the class PythonREPL should be None instead of {}The text was updated successfully, but these errors were encountered: