Symptom
On Windows, crewai run crashes while importing the crew. The traceback ends at UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1980.
Evidence what you'll see
- The crash is in
json.loadinsidelitellm/utils.py, reached byfrom crewai import Agent, Crew, Process, Task. - A comment shows the open as
.open("r")with no encoding, onlitellm/litellm_core_utils/tokenizers/anthropic_tokenizer.json. Python's text mode then uses the locale encoding. The comment names cp1254 and cp1252. - There was no crash on
v0.117.0. It started after upgrading tov0.117.1. A maintainer comment says0.117.1upgraded the dependency.
Why it happens
On Windows the default text encoding is the code page, not UTF-8. The dependency reads a JSON file without encoding="utf-8", so a byte that is valid UTF-8 and invalid in that code page raises UnicodeDecodeError during import, before the crew runs. Pull request #2711 downgrades that dependency to 1.167.1 and says version 1.167.2 is not compatible with Windows. The issue text names a different pin, litellm==1.67.1.
Affected versions
Windows 11, Python 3.12.6, CrewAI CLI v0.117.1 installed with uv tool install crewai. The report says crewai run rebuilds the project environment. The linked issue does not describe the crash on Linux.
Fix steps
0 of 3 done
Your check marks stay in this browser only.
How to check it worked
- On Windows, run
crewai run. It gets pastfrom crewai import Agent, Crew, Process, TaskwithoutUnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1980.
If it still fails
- A later comment says downgrading to
0.117.0did not clear the error, and that creating a project still failed, on Windows 11. - The two pin numbers,
1.67.1in the issue and1.167.1in the pull request, are not the same string. The linked issue does not say which one a given install already has.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it