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
Describe the bug RuntimeError: There is no current event loop in thread 'MainThread'.
To Reproduce
UBUNTU 20.04 -- pipenv
╰─(googlebooks-rNF90ExY) ⠠⠵ ipython
Python 3.8.10 (default, Sep 28 2021, 16:10:42)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.30.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from search_engine_parser.core.engines.google import Search
...: searcher = Search()
...: results = searcher.search("Tallest mountain in the world")
RuntimeError Traceback (most recent call last)
in
1 from search_engine_parser.core.engines.google import Search
2 searcher = Search()
----> 3 results = searcher.search("Tallest mountain in the world")
/usr/lib/python3.8/asyncio/events.py in get_event_loop(self)
637
638 if self._local._loop is None:
--> 639 raise RuntimeError('There is no current event loop in thread %r.'
640 % threading.current_thread().name)
641
RuntimeError: There is no current event loop in thread 'MainThread'.
The text was updated successfully, but these errors were encountered:
Describe the bug
RuntimeError: There is no current event loop in thread 'MainThread'.
To Reproduce
UBUNTU 20.04 -- pipenv
╰─(googlebooks-rNF90ExY) ⠠⠵ ipython
Python 3.8.10 (default, Sep 28 2021, 16:10:42)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.30.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from search_engine_parser.core.engines.google import Search
...: searcher = Search()
...: results = searcher.search("Tallest mountain in the world")
RuntimeError Traceback (most recent call last)
in
1 from search_engine_parser.core.engines.google import Search
2 searcher = Search()
----> 3 results = searcher.search("Tallest mountain in the world")
~/.local/share/virtualenvs/googlebooks-rNF90ExY/lib/python3.8/site-packages/search_engine_parser/core/base.py in search(self, query, page, cache, proxy, proxy_auth, **kwargs)
279 page = 1
280 # Get search Page Results
--> 281 loop = asyncio.get_event_loop()
282 url = self.get_search_url(
283 query, page, **kwargs)
/usr/lib/python3.8/asyncio/events.py in get_event_loop(self)
637
638 if self._local._loop is None:
--> 639 raise RuntimeError('There is no current event loop in thread %r.'
640 % threading.current_thread().name)
641
RuntimeError: There is no current event loop in thread 'MainThread'.
The text was updated successfully, but these errors were encountered: