MoonshotAI / MoonshotAI/kimi-cli
windows安装cli出现WinError 17异常 || WinError 17 exception occurs when windows installation cli is installed
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
What version of Kimi Code CLI is running?
1.37.0
Which open platform/subscription were you using?
/login
Which model were you using?
kimi2.6
What platform is your computer?
win11
What issue are you seeing?
kimi-cli 在 Windows 上使用 os.replace() 做原子文件写入,但 Windows 版 Python 在某些场景下(即使同目录)会错误抛出 WinError 17(跨磁盘移动错误)。
What steps can reproduce the bug?
修复方案:将 kimi_cli 包中所有 os.replace() 替换为 shutil.move(),后者在 Windows 上支持跨卷移动,兼容性更好。
What is the expected behavior?
No response
Additional information
No response
What version of Kimi Code CLI is running?
1.37.0
Which open platform/subscription were you using?
/login
Which model were you using?
kimi2.6
What platform is your computer?
win11
What issue are you seeing?
kimi-cli uses os.replace() on Windows for atomic file writing, but the Windows version of Python will incorrectly throw WinError 17 (cross-disk move error) in some scenarios (even in the same directory).
What steps can reproduce the bug?
Fix: Replace all os.replace() in the kimi_cli package with shutil.move(), which supports cross-volume movement on Windows and has better compatibility.
What is the expected behavior?
No response
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the kimi_cli package for every os.replace() call and inspect how each one is used for file writes. Reproduce the Windows installation failure if possible, replace the affected calls as appropriate, and verify that installation no longer raises WinError 17 on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100