Skip to content

bug: 🐛 Fix import in OpenDeepSearch#47

Open
KhairallahA wants to merge 1 commit intosentient-agi:mainfrom
KhairallahA:main
Open

bug: 🐛 Fix import in OpenDeepSearch#47
KhairallahA wants to merge 1 commit intosentient-agi:mainfrom
KhairallahA:main

Conversation

@KhairallahA
Copy link
Copy Markdown

What

Fixes import errors and type handling bugs in OpenDeepSearch.

Changes

  1. Fixed 3 incorrect imports in crawl4ai_scraper.py:

    • Changed from src.opendeepsearch to from opendeepsearch
    • Lines 74, 163, 168
  2. Fixed build_context.py to handle SearchResult objects:

    • Added check for .data attribute before calling dict methods
    • Prevents AttributeError: 'SearchResult' object has no attribute 'get'

Why

  • Rest of codebase uses from opendeepsearch (18 occurrences)
  • These 3 lines caused ModuleNotFoundError when package installed via pip
  • SearchResult is an object with .data attribute, not a dict

Testing

  • Tested with real agent queries
  • No more import errors
  • Search functionality works correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant