Skip to content

Commit

Permalink
making get_screenshots work for png and jpg
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultLSDC authored Oct 4, 2024
1 parent c42496b commit 49ada25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browsergym/experiments/src/browsergym/experiments/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def get_screenshot(self, step: int, som=False) -> Image:
return self._screenshots[key]

def get_screenshots(self, som=False):
files = list(self.exp_dir.glob("screenshot_step_*.png"))
files = list(self.exp_dir.glob("screenshot_step_*"))
max_step = 0
for file in files:
step = int(file.name.split("_")[-1].split(".")[0])
Expand Down

0 comments on commit 49ada25

Please sign in to comment.