Fix stale train_ui.py directory guard in update.bat and export_debug.bat - #1586
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reported bug (possibly Windows-only): running
update.bat(andexport_debug.bat) fails immediately with:scripts/train_ui.pywas split intotrain_ui_ctk.pyandtrain_ui_qt.py(see #1565 / "Make Qt UI the default; rename train_ui scripts to _ctk/_qt"), butupdate.batandexport_debug.batstill guard on the old filename as their "are you in the right folder" sanity check, so the check always fails.start-ui.batwas already updated to check fortrain_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/.shscript, 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-filespassesVerified the intent by inspecting
start-ui.bat's existing fix and confirming no launcher referencestrain_ui_ctk.py. Not tested on a real Windows machine — I don't have one available.AI assistance
Drafted by Claude