-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Browser Use Version
0.2.5
Bug Description, Steps to Reproduce, Screenshots
def create_history_gif(
task: str,
history: AgentHistoryList,
#
output_path: str = 'agent_history.gif',
duration: int = 3000,
show_goals: bool = True,
show_task: bool = True,
show_logo: bool = False,
font_size: int = 40,
title_font_size: int = 56,
goal_font_size: int = 44,
margin: int = 40,
line_spacing: float = 1.5,
) -> None:
"""Create a GIF from the agent's history with overlaid task and goal text."""
if not history.history:
logger.warning('No history to create GIF from')
return
from PIL import Image, ImageFont
images = []
# if history is empty or first screenshot is None, we can't create a gif
if not history.history or not history.history[0].state.screenshot:
logger.warning('No history or first screenshot to create GIF from')
return
# Try to load nicer fonts
try:
# Try different font options in order of preference
# ArialUni is a font that comes with Office and can render most non-alphabet characters
font_options = [
'Microsoft YaHei', # 微软雅黑
'SimHei', # 黑体
'SimSun', # 宋体
'Noto Sans CJK SC', # 思源黑体
'WenQuanYi Micro Hei', # 文泉驿微米黑
'Helvetica',
'Arial',
'DejaVuSans',
'Verdana',
]
try add macos system default fonts, as those code can fixed
font_options = [
'PingFang.ttc',
'STHeiti Medium.ttc',
...
]
Failing Python Code
LLM Model
deepseek-chat
Operating System & Browser Versions
macos15.2
Full DEBUG Log Output
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working