Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change save and load encode to utf-8 #1836

Conversation

joaorura
Copy link
Contributor

After adapting files to Portuguese and saving.
When recovering, exceptions like these are common due to Portuguese symbols.
Fixing by changing to utf-8 standard

save (c:\Users\jmess\miniconda3\envs\rag\Lib\site-packages\ragas\prompt\pydantic_prompt.py:333)
save_prompts (c:\Users\jmess\miniconda3\envs\rag\Lib\site-packages\ragas\prompt\mixin.py:97)
(d:\GitHub\rag_eval\Untitled-1.py:82)
_run_code (c:\Users\jmess\miniconda3\envs\rag\Lib\runpy.py:88)
run_module_as_main (Current frame) (c:\Users\jmess\miniconda3\envs\rag\Lib\runpy.py:198)
[Chained Exc: 'charmap' codec can't decode byte 0x81 in position 470: character maps to ] (d:\GitHub\rag_eval\Untitled-1.py:77)
[Chained Exc: 'charmap' codec can't decode byte 0x81 in position 470: character maps to ] load_prompts (c:\Users\jmess\miniconda3\envs\rag\Lib\site-packages\ragas\prompt\mixin.py:119)
[Chained Exc: 'charmap' codec can't decode byte 0x81 in position 470: character maps to ] load (c:\Users\jmess\miniconda3\envs\rag\Lib\site-packages\ragas\prompt\pydantic_prompt.py:341)
[Chained Exc: 'charmap' codec can't decode byte 0x81 in position 470: character maps to ] load (c:\Users\jmess\miniconda3\envs\rag\Lib\json_init
.py:293)
[Chained Exc: 'charmap' codec can't decode byte 0x81 in position 470: character maps to ] decode (c:\Users\jmess\miniconda3\envs\rag\Lib\encodings\cp1252.py:23)

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 11, 2025
@jjmachan
Copy link
Member

hey @joaorura thanks a lot for fixing this 🙌🏽

@jjmachan jjmachan merged commit 6afb505 into explodinggradients:main Jan 14, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants