You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: AttributeError: 'NoneType' object has no attribute '__dict__' in get_response_tool_web/file_search_attributesΒ #1285
When using the OpenAI Agents SDK with file search or web search tools, on_span_end raises:
ERROR:openai.agents:Error in trace processor <agentops.instrumentation.agentic.openai_agents.processor.OpenAIAgentsProcessor
object> during on_span_end: 'NoneType' object has no attribute 'dict'
Root Cause
In agentops/instrumentation/providers/openai/attributes/response.py, three hasattr() checks guard calls to .__dict__ on
optional tool fields β but hasattr() returns True even when the attribute value is None:
Thanks for the detailed root cause analysis! I've submitted PR #1408 with the fix β added is not None guards alongside the hasattr() checks for user_location, filters, and ranking_options.
Activity
Fix AttributeError when tool attributes are None in web/file search
fix: add None checks before accessing __dict__ on optional tool fields
fix: add None checks before accessing __dict__ on optional tool fields (
Fix AttributeError when tool fields are None in OpenAI Agents SDK insβ¦
fix: guard __dict__ access with is not None checks for optional tool β¦
PHclaw commentedon Jun 18, 2026
Thanks for the detailed root cause analysis! I've submitted PR #1408 with the fix β added
is not Noneguards alongside thehasattr()checks foruser_location,filters, andranking_options.fix: guard __dict__ access with is not None checks for optional tool β¦
Fix optional search tool attribute handling