Describe the bug
The local python executor is unable to execute a code line involving the built-in isinstance function
Code to reproduce the error
from smolagents import CodeAgent
agent = CodeAgent(
model=...,
tools=[],
verbosity_level=2,
max_steps=5,
)
rep = agent.run("Run `isinstance(5, int)`")
Error logs (if any)
Code execution failed at line 'result = isinstance(5, int)' due to: TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
Expected behavior
The isinstance function should work correctly
Packages version:
1.18.0
Additional context
Of course the code runs well in my local terminal with python.