Getting Access Denied Error When Hitting API (Although, API is working fine when running on LocalHost via Django). #3193
Ubaid-The-Data-Scientist
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I used GPT4all to create a RAG Pipeline with the help of langchain. When I use API for other purposes, it works fine but when I Hit the RAG pipeline, It gives access denied error.
Error getting: Permission Error
Root Cause: Unable to create model download directory in system profile. Access denied to 'C:\Windows\system32\config\systemprofile.cache'
Environment:-
Python Version: 3.12
Operating System: Windows
Key Packages: * langchain * gpt4all * pydantic
Full Error:
{"error":"Error in Database Chain: Failed to create model download directory","traceback":"Traceback (most recent call last):\n File "C:\Python312\Lib\site-packages\gpt4all\gpt4all.py", line 323, in retrieve_model\n os.makedirs(DEFAULT_MODEL_DIRECTORY, exist_ok=True)\n File "", line 215, in makedirs\n File "", line 225, in makedirs\nPermissionError: [WinError 5] Access is denied: 'C:\\Windows\\system32\\config\\systemprofile\\.cache'\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File "C:\inetpub\wwwroot\hashmove-ai\HMAI\Controllers\ConversationalAIv2_Controller.py", line 143, in post\n hmgpt_response = query_response(input_query, query_intent)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\inetpub\wwwroot\hashmove-ai\HMAI_Business\ConversationalAIv2_Business.py", line 281, in query_response\n return response_functions.get(intent_response, irrelevant)(query)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\inetpub\wwwroot\hashmove-ai\HMAI_Business\ConversationalAIv2_Business.py", line 251, in logistics\n chain = log_chain(load_llm(), vector_db(), memory(), log_prompt())\n ^^^^^^^^^^\n File "C:\inetpub\wwwroot\hashmove-ai\HMAI_Business\ConversationalAIv2_Business.py", line 90, in load_llm\n loaded_llm = GPT4All(\n ^^^^^^^^\n File "C:\Python312\Lib\site-packages\langchain_core\load\serializable.py", line 125, in init\n super().init(*args, **kwargs)\n File "C:\Python312\Lib\site-packages\pydantic\main.py", line 212, in init\n validated_self = self.pydantic_validator.validate_python(data, self_instance=self)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python312\Lib\site-packages\pydantic\_internal\_decorators_v1.py", line 148, in _wrapper1\n return validator(values)\n ^^^^^^^^^^^^^^^^^\n File "C:\Python312\Lib\site-packages\langchain_core\utils\pydantic.py", line 208, in wrapper\n return func(cls, values)\n ^^^^^^^^^^^^^^^^^\n File "C:\Python312\Lib\site-packages\langchain_community\llms\gpt4all.py", line 145, in validate_environment\n values["client"] = GPT4AllModel(\n ^^^^^^^^^^^^^\n File "C:\Python312\Lib\site-packages\gpt4all\gpt4all.py", line 235, in init\n self.config: ConfigType = self.retrieve_model(model_name, model_path=model_path, allow_download=allow_download, verbose=verbose)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "C:\Python312\Lib\site-packages\gpt4all\gpt4all.py", line 325, in retrieve_model\n raise RuntimeError("Failed to create model download directory") from e\nRuntimeError: Failed to create model download directory\n"}
Beta Was this translation helpful? Give feedback.
All reactions