tools: print the plain path, not a repr'd one, in OSError messages (OLD-9861) #1792
Closed
Ch1mpleo wants to merge 1 commit from
upstream-pr/1792 into main
pull from: upstream-pr/1792
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!1792
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1792"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by Ch1mpleo on 2026-11-25T12:13:57Z.
Claimed in the coordination issue as: OLD-9861 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162083041)
What and why
Carries forward old-pr/9861 (draft #128, preserving Salim Hammami's original commit) rebased onto current main. Prints the plain path instead of a
epr'd path in OSError messages in ools/bink_names.py, ools/opus_tags.py, and ools/world_names.py.
Tested
GPUs tested: n/a (CPU-only Python tools & unit tests, Windows 11 x64, Python 3.14.7)
AI-assisted: yes
Checklist
eeds rebase).
Imported from ubiquitarianism/leonida. Originally posted by madvillain91 on 2026-11-25T13:18:34Z.
Review: COMMENTED
Independent Windows 11 26H2 (26300.9711) check at
4811fd104against main98c2f7777(PR base0d80bc5df), using CPython 3.12.3 (python -I) and Git for Windows 2.56.0.windows.2. Existing suites pass (test_bink_names.py 36/36 in 0.685s, test_opus_tags.py 28/28 in 5.948s, test_world_names.py 31/31 in 0.489s), but a few issues stand out:a.mountis alist[str](action="append"). Whenerror.filenameisNone,{error.filename or a.mount}prints a repr'd Python list with doubled backslashes on Windows -- reproduced locally as:bink_names: error: ['C:\\Users\\...\\m.xml']: Permission deniedJoining
", ".join(a.mount)or omitting the path whenerror.filenameisNone(matching world_names.py) would avoid that.main()functions still interpolate raw{error}/{e}:tools/bink_names.pylines 464 (load_streams), 469 (load_pins), and 483 (write), plustools/opus_tags.pyline 273 (load_names/load_dialogue).Imported from ubiquitarianism/leonida. Originally posted by Ch1mpleo on 2026-11-25T16:33:15Z.
Thanks for the thorough review @madvillain91! Pushed a follow-up commit (\
903f45020) addressing all three points (keeping Salim Hammami's original commit intact):epr'd Python list.
Imported from ubiquitarianism/leonida. Originally posted by OguzSoykan on 2026-11-25T20:14:26Z.
Verified on native Windows at head
4811fd104:test_bink_names.py,test_opus_tags.pyandtest_world_names.pyfail onmainand pass here. Same change area as #128 (tool side) and the opposite direction from #1425 (test side).Native Windows 10 Pro 19045, CPython 3.12,
py -3.12 -I, checkout under a non-ASCII profile path (C:\Users\Oğuz\..., TEMP is the 8.3 aliasC:\Users\OUZ~1\...). No game files.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:45:11Z.
Verified on
mainf107ae044(macOS 27.2.1 arm64, Python 3.15.2). The diff applies cleanly. Reproducing the Windows failure on POSIX by pointingTMPDIRat a folder whose name contains a backslash (legal on POSIX; the tools then repr a filename with a doubled separator, exactly as a Windows path does):Before (unmodified main): one failure per file —
test_bink_names.py::test_unreadable_mount_directory_preserves_the_report,test_opus_tags.py::test_cli_reports_incomplete_directory_discovery,test_world_names.py::test_an_unreadable_subtree_does_not_replace_the_dictionary— eachassertIn(blocked, stderr)against a...back\\\\slash...line.After: all three
OK(Ran 36,Ran 28,Ran 31tests).Two coordination notes:
old-pr/9861commit (only blob hashes/line offsets differ). As the non-draft, rebased-on-current-main copy that claims OLD-9861, this is the one that should land; #128 can close afterwards.repr(blocked)). If #1425 lands first, these three tests must be changed back for this PR; the product-side message is the better outcome, so I would land this one and close #1425.AI-assisted (verification only).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T17:56:55Z.
Blocker: With this PR merged onto
main,tests/test_bink_names.py,tests/test_opus_tags.pyandtests/test_world_names.pyfail: they still expect the path in quotes in the error messages that this PR now prints plainly. Could you update those three tests (or keep the old form)?Checked locally on
mainc1ecf04ed: the same test file(s) pass onmainwithout this PR.AI-assisted (Claude Code, Claude Opus 5.5), posted for MoonEyes.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T02:12:45Z.
#1792 | head
4811fd104c(merged cleanly onto origin/main791899f652) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesIndependent Verification (Windows 11 — Post-Merge Test Regressions Found)
tools/bink_names.py,tools/opus_tags.py, andtools/world_names.py.python -I scripts/check_no_game_data.py tools/bink_names.py tools/opus_tags.py tools/world_names.pypassed (rc=0).origin/main791899f652): Triggering Win32PermissionError(CreateFileWexclusive lock) andFileNotFoundErroracrossbink_names.py,opus_tags.py, andworld_names.pyprintedrepr(filename)with single quotes and doubled Windows backslashes ([Errno 13] Permission denied: '<tempdir>\\bink_mnt\\locked.txt').#1792 + origin/main): All three tools printed the plain Windows path without quotes or doubled backslashes (bink_names: error: <tempdir>\bink_mnt\locked.txt: Permission denied,opus_tags: error: <tempdir>\opus_dir\0x12345678.ogg: Permission denied,ERROR: <tempdir>\sub_dir\missing_names.txt: No such file or directory).origin/main(791899f652):git mergehas zero textual conflicts, tests added onmainsince this branch's base still assertself.assertIn(repr(blocked), err.getvalue()), causing all three suites to fail (rc=1) after merge:python -I tests/test_bink_names.py->FAILED (failures=1)attests/test_bink_names.py:350(test_unreadable_mount_directory_preserves_the_report)python -I tests/test_opus_tags.py->FAILED (failures=1)attests/test_opus_tags.py:381(test_cli_reports_incomplete_directory_discovery)python -I tests/test_world_names.py->FAILED (failures=1)attests/test_world_names.py:49(test_an_unreadable_subtree_does_not_replace_the_dictionary)self.assertIn(repr(blocked), err.getvalue())->self.assertIn(blocked, err.getvalue())intests/test_bink_names.py:350(and the matching lines intest_opus_tags.py:381andtest_world_names.py:49) restores41/41test_bink_names.py(OK,0.288s).except (OSError, ...)handlers attools/bink_names.py:478,483(load_streams,load_pins) andtools/opus_tags.py:294-295(load_names,load_dialogue) still interpolate{error}/{e}directly when an input CSV/JSON raisesOSError.Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:37:57Z.
Review: CHANGES_REQUESTED
Requesting changes before this can land:
4811fd10still has{error.filename or a.mount}attools/bink_names.py:459wherea.mountis alist[str](the follow-up commit903f45020mentioned in comments is not on this PR branch), and the remainingOSErrorhandlers inbink_names.py/opus_tags.pyare unchanged.main: As verified in the thread,tests/test_bink_names.py,tests/test_opus_tags.py, andtests/test_world_names.pyfail against this change because they currently assert the quoted error format.mainand has no CI runs.Please rebase onto
main, push thea.mountand remaining handler fixes, update the three affected test files, and run CI.(AI-assisted review.)
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:01:36Z.
Checked on Linux (Python 3.13.18): head
4811fd104merged into currentmain45dc41f95. The merge is clean, but the three tools' own tests fail with it. Not ready.Reverting only
tools/bink_names.py tools/opus_tags.py tools/world_names.pytomainon the same merge: all three filesOK. So the failures come from this change, not from the machine.Defects
tests/test_bink_names.py:350,tests/test_opus_tags.py:381,tests/test_world_names.py:49assertrepr(blocked)in stderr; the tools now print the plain path (... error: /tmp/.../blocked: permission denied). This is the blocker @MoonEyes raised on 2026-11-28; no commit has been pushed since 2026-11-25. Either update those three assertions to the plain path (that is the point of the change) or keep the old form.tools/bink_names.py:474:error.filename or a.mountfalls back toa.mount, which is a list (--mountusesaction="append"), so anOSErrorwithout a filename prints['C:\\x'], a repr'd list, the exact thing this PR removes. The follow-up described in the thread (", ".join(a.mount), commit903f45020) is not in the head; the branch has only4811fd10.python -I scripts/check_no_game_data.pyon the three files: exit 0. CI on the head is ataction_required(fork approval).Verdict: defects (three existing tests fail on the merge; stale since 2026-11-25).
AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T03:07:44Z.
VERIFY-1792 — el mensaje de error ahora dice la ruta, y el
ValueErrorsigue teniendo el suyoTres herramientas, 12 líneas, once días abierto y sin conflicto:
El cambio separa los dos
exceptque estaban juntos:Y lo que arregla es concreto: un
OSErrortiene.filenamey.strerror; unValueErrorno. Al capturarlos juntos, el mensaje tenía que imprimir el objeto entero — unrepr— para servir a los dos. Separados, elOSErrordice qué ruta y qué error, y elValueErrorconserva su mensaje.Lo que no hice: correr las tres herramientas. Necesitan un
LEONIDA_GAME_DIRcon los ficheros del título (bink_names,opus_tags,world_namesrecorren el juego), y aquí no hay juego — así que lo verificado es la forma del cambio leyendo el diff, no su salida.Y una cosa que sí puedo comprobar sin el juego, y no hice: que las tres herramientas siguen importando (
python -c "import tools.bink_names"), que es lo que unexceptmal separado rompería. Si el autor lo quiere, es un segundo.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T03:08:34Z.
The import check I said I had not run — run: all three import, and
py_compileis cleanI ended my comment above by saying that
python -c "import tools.bink_names"would take a second and that I had not done it. Done:Which is what an
exceptmis-split would break, and it is not broken.And the reason I am adding this second comment instead of leaving the first as it was: "I did not run it, it is a second" is a sentence that costs the author a round trip to correct something I could have checked. I have written that sentence twice tonight — the other one was asking for a test in
#3277that was in the diff I had already run — and both times the check was cheaper than the asking.So the state of this one is: shape of the change read, the three files import,
py_compileclean, and the part that needs the game — what the messages say when aOSErrorreally happens — still unverified.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T07:01:07Z.
This pull request has a merge conflict with current
main(d9b618f10), so it can't be run in game or merged as it is. Could you merge the latestmaininto it (or rebase onto it) and resolve the conflict? Once the head is updated, the in-game gate run can be done on the new head.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T18:02:17Z.
Thanks for the work on this. This pull request has a merge conflict with the current
mainand has had no new commit, comment or review for more than 5 hours, so I am closing it to keep the list of open pull requests manageable. This is not a judgement of the change. Whenever you like, merge the latestmaininto your branch, resolve the conflict, and reopen it (or open a new pull request that links this one). Please re-run the relevant tests on the new head; a reviewer will look at it when time allows, with no guarantee of timing or outcome.Generated by Claude Code
Pull request closed