Hello Seeing the following exception when I execute the line index.as_query_engine(llm=None). What could be causing this issue?
File "/....../.venv/lib/python3.9/site-packages/llama_index/core/indices/base.py", line 391, in as_query_engine from llama_index.core.query_engine.retriever_query_engine import ( File "/....../.venv/lib/python3.9/site-packages/llama_index/core/query_engine/init.py", line 14, in <module> from llama_index.core.query_engine.flare.base import FLAREInstructQueryEngine File "/....../.venv/lib/python3.9/site-packages/llama_index/core/query_engine/flare/base.py", line 24, in <module> from llama_index.core.query_engine.retriever_query_engine import RetrieverQueryEngine File "/....../.venv/lib/python3.9/site-packages/llama_index/core/query_engine/retriever_query_engine.py", line 27, in <module> dispatcher = instrument.get_dispatcher(name) File "/....../.venv/lib/python3.9/site-packages/llama_index/core/instrumentation/init.py", line 26, in get_dispatcher new_dispatcher = Dispatcher( File "/....../.venv/lib/python3.9/site-packages/llama_index/core/instrumentation/dispatcher.py", line 65, in init self._asyncio_lock = asyncio.Lock() File "/.../.pyenv/versions/3.9.6/lib/python3.9/asyncio/locks.py", line 81, in init self._loop = events.get_event_loop() File "/.../.pyenv/versions/3.9.6/lib/python3.9/asyncio/events.py", line 642, in get_event_loop raise RuntimeError('There is no current event loop in thread %r.' RuntimeError: There is no current event loop in thread 'Thread-79'.
I already mentioned this. But just incase you have missed it. I am seeing similar errors when I simply import BaseEmbedding from llama_index.core.embeddings import BaseEmbedding2024-04-08T07:41:51.523398341Z File "/app/.venv/lib/python3.9/site-packages/llama_index/core/init.py", line 15, in <module>2024-04-08T07:41:51.523400447Z from llama_index.core.embeddings.mock_embed_model import MockEmbedding2024-04-08T07:41:51.523402662Z File "/app/.venv/lib/python3.9/site-packages/llama_index/core/embeddings/init.py", line 1, in <module>2024-04-08T07:41:51.523405175Z from llama_index.core.base.embeddings.base import BaseEmbedding2024-04-08T07:41:51.523407203Z File "/app/.venv/lib/python3.9/site-packages/llama_index/core/base/embeddings/base.py", line 26, in <module>2024-04-08T07:41:51.523409468Z import llama_index.core.instrumentation as instrument2024-04-08T07:41:51.523411699Z File "/app/.venv/lib/python3.9/site-packages/llama_index/core/instrumentation/init.py", line 5, in <module>2024-04-08T07:41:51.523414054Z root_dispatcher: Dispatcher = Dispatcher(2024-04-08T07:41:51.523415985Z File "/app/.venv/lib/python3.9/site-packages/llama_index/core/instrumentation/dispatcher.py", line 65, in init2024-04-08T07:41:51.523418048Z self._asyncio_lock = asyncio.Lock()2024-04-08T07:41:51.523420017Z File "/usr/local/lib/python3.9/asyncio/locks.py", line 81, in init2024-04-08T07:41:51.523422179Z self._loop = events.get_event_loop()2024-04-08T07:41:51.523425208Z File "/usr/local/lib/python3.9/asyncio/events.py", line 642, in get_event_loop2024-04-08T07:41:51.523427198Z raise RuntimeError('There is no current event loop in thread %r.'2024-04-08T07:41:51.523429237Z RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-0_0'