severian42 / GraphRAG-Local-UI

GraphRAG using Local LLMs - Features robust API and multiple apps for Indexing/Prompt Tuning/Query/Chat/Visualizing/Etc. This is meant to be the ultimate GraphRAG/KG local LLM app.
MIT License
1.69k stars 198 forks source link

Indexing error after starting over from scratch... #16

Closed JB5579 closed 3 months ago

JB5579 commented 3 months ago

Here is a the error I am getting when trying to index a .txt file. I now at a loss after rebuilding my conda env and starting over from scratch. Thanks in advance for any advice.

File "C:\Users\14045\AppData\Roaming\Python\Python311\site-packages\rich_win32_console.py", line 403, in write_text

self.write(text)

File "C:\Python311\Lib\encodings\cp1252.py", line 19, in encode

return codecs.charmap_encode(input,self.errors,encoding_table)[0]

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f680' in position 0: character maps to

----Here are my settings for llm and embeddings: { "api_base": "http://localhost:11434/v1", "api_key": "${GRAPHRAG_API_KEY}", "concurrent_requests": 10, "model": "mistral", "model_supports_json": true, "type": "openai_chat" }

{ "async_mode": "threaded", "llm": { "api_base": "http://localhost:11434/v1", "api_key": "${GRAPHRAG_API_KEY}", "concurrent_requests": 10, "model": "nomic-embed-text", "type": "openai_embedding" } }

Hereliu commented 3 months ago

you can delete some wired irons in ./graprag/config/models/index/progress/rich.py

aibo1233 commented 3 months ago

Or you can adjust to UTF-8 in the system settings

severian42 commented 3 months ago

Hey! Hopefully the UTF-8 adjustment is a good fix. I don't have Windows so I am not able to reproduce this error on my end. I'll see if I can find a permanent solution for Windows users

gengyanlei commented 3 months ago

@Hereliu May I ask which codes need to be deleted?