Skip to content

KeyError: 'frameId' #146

@alzambranolu13

Description

@alzambranolu13

I'm again having issues related to the frames while trying the instruction: "Open the Irish Independent website." which leads to the agent opening this website https://www.independent.ie/ and encountering the following error.

INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:browsergym.experiments.loop:The previous action successfully clicked on the search result for the Irish Independent. Now, I need to navigate to the actual website. The link for the Irish Independent is visible, and I will click on it to open the website.

action:
click('541')

WARNING:browsergym.experiments.loop:Exception uncaught by agent or environment in task openended.
KeyError:
'frameId'
Traceback (most recent call last):
  File "/home/alejandra/Documents/AgentLab/agentlab/lib/python3.12/site-packages/browsergym/experiments/loop.py", line 235, in run
    step_info.from_step(env, action, obs_preprocessor=agent.obs_preprocessor)
  File "/home/alejandra/Documents/AgentLab/agentlab/lib/python3.12/site-packages/browsergym/experiments/loop.py", line 353, in from_step
    self.obs, self.reward, self.terminated, self.truncated, env_info = env.step(action)
                                                                       ^^^^^^^^^^^^^^^^
  File "/home/alejandra/Documents/AgentLab/agentlab/lib/python3.12/site-packages/gymnasium/wrappers/time_limit.py", line 57, in step
    observation, reward, terminated, truncated, info = self.env.step(action)
                                                       ^^^^^^^^^^^^^^^^^^^^^
  File "/home/alejandra/Documents/AgentLab/agentlab/lib/python3.12/site-packages/gymnasium/wrappers/order_enforcing.py", line 56, in step
    return self.env.step(action)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/alejandra/Documents/AgentLab/agentlab/lib/python3.12/site-packages/browsergym/core/env.py", line 389, in step
    obs = self._get_obs()
          ^^^^^^^^^^^^^^^
  File "/home/alejandra/Documents/AgentLab/agentlab/lib/python3.12/site-packages/browsergym/core/env.py", line 484, in _get_obs
    axtree = extract_merged_axtree(self.page)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/alejandra/Documents/AgentLab/agentlab/lib/python3.12/site-packages/browsergym/core/observation.py", line 499, in extract_merged_axtree
    frame_id = cdp.send(
               ^^^^^^^^^
KeyError: 'frameId'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions