Skip to content

python api.py error #161

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

Open
DevakeeNandan opened this issue Apr 27, 2025 · 1 comment
Open

python api.py error #161

DevakeeNandan opened this issue Apr 27, 2025 · 1 comment

Comments

@DevakeeNandan
Copy link

After I installed the requirements, If I run api.py it returns these errors:
python api.py Traceback (most recent call last): File "D:\Patternautomation\Git\suna-main\backend\api.py", line 5, in <module> from agentpress.thread_manager import ThreadManager File "D:\Patternautomation\Git\suna-main\backend\agentpress\thread_manager.py", line 15, in <module> from services.llm import make_llm_api_call File "D:\Patternautomation\Git\suna-main\backend\services\llm.py", line 18, in <module> import litellm File "C:\Users\devak\AppData\Roaming\Python\Python313\site-packages\litellm\__init__.py", line 762, in <module> from .cost_calculator import completion_cost File "C:\Users\devak\AppData\Roaming\Python\Python313\site-packages\litellm\cost_calculator.py", line 19, in <module> from litellm.litellm_core_utils.llm_cost_calc.utils import ( ...<2 lines>... ) File "C:\Users\devak\AppData\Roaming\Python\Python313\site-packages\litellm\litellm_core_utils\llm_cost_calc\utils.py", line 9, in <module> from litellm.utils import get_model_info File "C:\Users\devak\AppData\Roaming\Python\Python313\site-packages\litellm\utils.py", line 188, in <module> json_data = json.load(f) File "C:\Python313\Lib\json\__init__.py", line 293, in load return loads(fp.read(), ~~~~~~~^^ File "C:\Python313\Lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1980: character maps to <undefined>

@gladosb5
Copy link

do this
set PYTHONUTF8=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants