Skip to content

Fix stale train_ui.py directory guard in update.bat and export_debug.bat - #1586

Merged
dxqb merged 1 commit into
Nerogar:mergefrom
dxqb:fix-update-bat-train-ui-guard
Jul 5, 2026
Merged

Fix stale train_ui.py directory guard in update.bat and export_debug.bat#1586
dxqb merged 1 commit into
Nerogar:mergefrom
dxqb:fix-update-bat-train-ui-guard

Conversation

@dxqb

@dxqb dxqb commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reported bug (possibly Windows-only): running update.bat (and export_debug.bat) fails immediately with:

Error: train_ui.py does not exist, you have done something very wrong. Reclone the repository.

scripts/train_ui.py was split into train_ui_ctk.py and train_ui_qt.py (see #1565 / "Make Qt UI the default; rename train_ui scripts to _ctk/_qt"), but update.bat and export_debug.bat still guard on the old filename as their "are you in the right folder" sanity check, so the check always fails. start-ui.bat was already updated to check for train_ui_qt.py (the current default UI entry point) — this PR applies the same fix to the other two scripts. train_ui_ctk.py (the legacy CTk UI) isn't launched by any .bat/.sh script, so there's no need for the guard to reference it specifically; one consistently-existing reference file is enough.

Test plan

  • pre-commit run --all-files passes
  • Launched the affected UI or script and exercised the change
  • Tested with at least one real preset / config when relevant (note which: ____)

Verified the intent by inspecting start-ui.bat's existing fix and confirming no launcher references train_ui_ctk.py. Not tested on a real Windows machine — I don't have one available.

AI assistance

  • Early AI prototype — opened for discussion, not ready for review

Drafted by Claude

scripts/train_ui.py was split into train_ui_ctk.py and train_ui_qt.py, but
these two launchers still checked for the old filename as their "are you
in the right folder" guard, so they always failed with "you have done
something very wrong. Reclone the repository." start-ui.bat already checks
for train_ui_qt.py; apply the same fix here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dxqb
dxqb marked this pull request as ready for review July 5, 2026 10:34
@dxqb
dxqb merged commit 32f228a into Nerogar:merge Jul 5, 2026
1 check passed
@dxqb
dxqb deleted the fix-update-bat-train-ui-guard branch July 5, 2026 10:34
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

Successfully merging this pull request may close these issues.

1 participant