[BUG] doesnt work on windows os. Fixes listed to get it working
Bug Description
Some issues on windows os that can be fixed with documentaion and code fixes
Steps to Reproduce
try running on windows os
✅ Expected Behavior
working on windows
❌ Actual Behavior
errors on windows
Screenshots
If applicable, add screenshots to help explain your problem.
️ Environment Information
Desktop/Server:
- OS: [e.g. macOS 13.4, Ubuntu 20.04, Windows 11]
- Python Version: [e.g. 3.11.5]
- Node.js Version: [e.g. 23.10.0]
- Ollama Version: [e.g. 0.9.5]
- Docker Version: [e.g. 24.0.6] (if using Docker)
Browser (if web interface issue):
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 118.0.0.0]
System Health Check
Please run python system_health_check.py and paste the output:
[Paste system health check output here]
Error Logs
Please include relevant error messages or logs:
[Paste error logs here]
Configuration
- Deployment method: [Docker / Direct Python]
- Models used: [e.g. qwen3:0.6b, qwen3:8b]
- Document types: [e.g. PDF, DOCX, TXT]
Additional Context
Add any other context about the problem here.
Possible Solution
1)The windows os doesnt handle all the icons in terminal and generates python char decoding errors Fix: set PYTHONIOENCODING=utf-8 run this command in the terminal before running any of the python files in this package Please add this to the documentation
- npm dev commands fails which even though npm exists in windows Fix: this code in the run_system.py to handle npm.cmd shims
import shutils self.logger.info(f" Starting {service_name} on port {config.port}...")
try:
# Setup environment
env = os.environ.copy()
if config.env:
env.update(config.env)
self.logger.info(f"Command: {' '.join(config.command)}")
# Resolve executable on Windows (handle npm -> npm.cmd shims)
cmd = list(config.command)
if os.name == 'nt' and cmd:
resolved = shutil.which(cmd[0])
if resolved:
cmd[0] = resolved
# Start process
process = subprocess.Popen(
cmd, #config.command,
cwd=config.cwd,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
bufsize=1,
universal_newlines=True
)
Source: PromtEngineer/localGPT