Closed kspviswa closed 4 months ago
Only when I call a func in search.py that uses DDGS, I'm seeing this error.
Can you show search.py
?
update to v4.4.1
pip install -U duckduckgo_search
If I run the code standalone, I don't see any issue. But If I run search.py
along with the main.py
, I'm seeing this error
There is no current event loop in thread 'Thread-79 (send)'
Can you please point me what am I missing? I'm not seeing this issue with v4.4
.
I need a synchronous call to my search. That's the reason I'm preferring to use DDGS instead of AsyncDDGS. But as per https://github.com/deedy5/duckduckgo_search/blob/9871eeb845c085405a22039f2624e992fba0568e/duckduckgo_search/duckduckgo_search.py#L13 , there is no such demarcation.
I'm actually using langchain's ddgs search wrapper : https://github.com/langchain-ai/langchain/blob/master/libs/community/langchain_community/utilities/duckduckgo_search.py#L47 , which clearly uses
DDGS
withwith
scope as suggested.However, I'm seeing lot this (below) while running my app :
I was puzzled why am I getting this since I never used AsyncDDGS but now its clear why. But still I couldn't understand how to get rid of this. Could you share any pointers?