Agent.python_executor in Web Browser Automation

I’m experiencing an issue with the agent.python_executor function in SmolAgents. When I try to run the following code:

agent.python_executor("from helium import *", agent.state)

I get the error:

TypeError: LocalPythonExecutor.__call__() takes 2 positional arguments but 3 were given

I’m following the example from the official documentation (Web Browser Automation with Agents 🤖🌐), but I’m still getting this error.

I’ve checked the versions of my dependencies, including SmolAgents and Helium, and they are up to date. I’ve also reviewed my code and can’t find any issues with the logic.

1 Like

It seems that the function specifications have changed without notice…:sweat_smile:

#agent.python_executor("from helium import *", agent.state)
agent.python_executor("from helium import *")
1 Like

Thank you!

1 Like