I encountered such error when running 01_Index.py file following the guidance in readme.md. After some debugging, I figured out it is because the data folder is empty.
Can you pls add some instructions in readme to let customers know they should add pdfs in data folder then run 01_index.py?
Traceback (most recent call last):
File "C:\Users\yijunzhang\Documents\code_repo\rag-experiment-accelerator\01_Index.py", line 72, in
upload_data(data_load,service_endpoint,index_name,key, dimension, chat_model_name, temperature)
File "C:\Users\yijunzhang\Documents\code_repo\rag-experiment-accelerator\ingest_data\acs_ingest.py", line 46, in upload_data
results = search_client.upload_documents(documents)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yijunzhang\Anaconda3\envs\fhl\Lib\site-packages\azure\search\documents_search_client.py", line 543, in upload_documents
results = self.index_documents(batch, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yijunzhang\Anaconda3\envs\fhl\Lib\site-packages\azure\core\tracing\decorator.py", line 76, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yijunzhang\Anaconda3\envs\fhl\Lib\site-packages\azure\search\documents_search_client.py", line 641, in index_documents
return self._index_documents_actions(actions=batch.actions, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yijunzhang\Anaconda3\envs\fhl\Lib\site-packages\azure\search\documents_search_client.py", line 649, in _index_documents_actions
batch_response = self._client.documents.index(batch=batch, error_map=error_map, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yijunzhang\Anaconda3\envs\fhl\Lib\site-packages\azure\core\tracing\decorator.py", line 76, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yijunzhang\Anaconda3\envs\fhl\Lib\site-packages\azure\search\documents_generated\operations_documents_operations.py", line 1264, in index
raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: (MissingRequiredParameter) The request is invalid. Details: actions : No indexing actions found in the request. Please include between 1 and 32000 indexing actions in your request.
Code: MissingRequiredParameter
Message: The request is invalid. Details: actions : No indexing actions found in the request. Please include between 1 and 32000 indexing actions in your request.
Exception Details: (MissingIndexDocumentsActions) No indexing actions found in the request. Please include between 1 and 32000 indexing actions in your request. Parameters: actions
Code: MissingIndexDocumentsActions
Message: No indexing actions found in the request. Please include between 1 and 32000 indexing actions in your request. Parameters: actions