[Other] setup.py writes run-*.bat as UTF-8 without BOM, so a Cyrillic install path is unreadable by cmd

Abierto Apto para principiantes
#7,230 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 5 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
cli, devtools

Línea de trabajo

Lee setup.py y localiza el paso que escribe run-*.bat; inspecciona cómo construye las rutas y codifica el script generado. Reproduce el problema con una ruta de instalación en cirílico usando el comando del issue. El trabajo estará terminado cuando el archivo batch generado se inicie correctamente desde una ruta así; el ejemplo relativo %~dp0 de quien reportó el problema concreta el comportamiento esperado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Area

[Other] — setup and installation (the start script setup.py generates)

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

What happened

The install folder contains a non-ASCII segment — C:\Qwen3.8-Flash-Next\Инсталяторы\Strata-0.2.22-Qwen3.8-Hy4-Inkling2\Strata-portable\terminal. Step 7 ("writing the start script") writes run-iq3_s.bat as UTF-8 without a BOM, but cmd.exe reads batch files in the OEM code page (cp866 on this PC), so every absolute path inside the file turns into mojibake and the script cannot run:

@echo off
title Strata IQ3_S
cd /d "C:\Qwen3.8-Flash-Next\╨Ш╨╜╤Б╤В╨░╨╗╤П╤В╨╛╤А╤Л\Strata-0.2.22-…\Strata-portable\terminal"
"C:\Qwen3.8-Flash-Next\╨Ш╨╜╤Б╤В╨░╨╗╤П╤В╨╛╤А╤Л\…\python\python.exe" "…\serve\server.py" "--engine" "strata" …

cd /d fails with "The system cannot find the path specified", so double-clicking the generated script never starts the model even though setup reported success. The JSON run config is unaffected: strata-iq3_s.json stores the same path as C:\\…\\\u0418\u043d\u0441\u0442\u0430\u043b\u044f\u0442\u043e\u0440\u044b\\…, so the engine and the model files are fine.

Expected: the generated run-*.bat starts the model whatever the install path contains.

Smallest steps or command that reproduce it

  1. Put the unpacked control package (or the portable tree) under a folder whose name has Cyrillic letters, e.g. …\Инсталяторы\Strata-portable\terminal.
  2. python\python.exe setup.py --family qwen --model IQ3_S --context 131072 --kv int8 --vision yes --yes --no-start.
  3. Open the generated terminal\run-iq3_s.bat in Notepad, or run it: the paths are mojibake and cd fails.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.22 · control 0.1.69 · bundled Python 3.12.15

Graphics card, memory and system

RTX 3090 24 GB · 126 GB RAM · Windows 10 Pro x64

Model, size and settings

Qwen3.8-Flash-Next IQ3_S · 131072 context · KV int8 · pictures on

Logs

Setup itself finishes and prints [ok] start script: run-iq3_s.bat; the failure is only visible when the script is read or executed by cmd.

Workaround: rewrote the script as pure ASCII with paths relative to the script, which also makes it independent of where the folder lives:

@echo off
title Strata IQ3_S
cd /d "%~dp0"
"%~dp0python\python.exe" "%~dp0serve\server.py" --engine strata --config "%~dp0strata-iq3_s.json" --port 8080 --open
if errorlevel 1 pause

With that the engine starts normally: ready: http://127.0.0.1:8080/v1 — context 131072 tokens, images on, 22 267 MiB of VRAM in use, /health returns {"status":"ok","max_context":131072,"model":"qwen3.8-flash-next-iq3_s","images":true,"loaded":true}.

Possible fixes, best first: write the script with %~dp0-relative paths and ASCII text only (survives moving the folder too); or encode it in the console code page (locale.getpreferredencoding(False)); or keep UTF-8 but put chcp 65001 >nul as the first line after @echo off. The relative-path variant is the only one that also removes the dependency on the install location.

Lenguaje dominante
C++
Estrellas
11.6k
Forks
1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Niko1221/Strata

Todos los issues de Niko1221/Strata

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.