$ mkdir /tmp/foo
$ cd /tmp/foo
$ git init
$ prek sample-config > .pre-commit-config.yaml
$ python -c 'open(b"A" + bytes([i for i in range(1, 256) if chr(i) != "/"]), "w")'
$ git add .
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .pre-commit-config.yaml
new file: "A\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !\"#$%&'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
$ git commit -am 'Test'
[master (root-commit) 6468d21] Test
2 files changed, 10 insertions(+)
create mode 100644 .pre-commit-config.yaml
create mode 100644 "A\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !\"#$%&'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
$ prek run --all-files
error: Failed to collect files
caused by: invalid utf-8 sequence of 1 bytes from index 127
2026-02-27T21:55:30.415770Z DEBUG prek: 0.3.3
2026-02-27T21:55:30.415802Z DEBUG Args: ["prek", "run", "--all-files"]
2026-02-27T21:55:30.416984Z TRACE get_root: close time.busy=1.16ms time.idle=1.56µs
2026-02-27T21:55:30.417000Z DEBUG Git root: /tmp/foo
2026-02-27T21:55:30.417012Z DEBUG Found workspace root at `/tmp/foo`
2026-02-27T21:55:30.417019Z TRACE Include selectors: ``
2026-02-27T21:55:30.417022Z TRACE Skip selectors: ``
2026-02-27T21:55:30.417062Z DEBUG discover{root="/tmp/foo" config=None refresh=false}: Loaded workspace from cache
2026-02-27T21:55:30.417074Z DEBUG discover{root="/tmp/foo" config=None refresh=false}: Loading project configuration path=.pre-commit-config.yaml
2026-02-27T21:55:30.417172Z TRACE discover{root="/tmp/foo" config=None refresh=false}: close time.busy=141µs time.idle=506ns
2026-02-27T21:55:30.417319Z TRACE Checking lock resource="store" path=/home/tyilo/.cache/prek/.lock
2026-02-27T21:55:30.417332Z DEBUG Acquired lock resource="store"
2026-02-27T21:55:30.419318Z TRACE No requires-python found in pyproject.toml hook=trailing-whitespace
2026-02-27T21:55:30.419455Z TRACE No requires-python found in pyproject.toml hook=end-of-file-fixer
2026-02-27T21:55:30.419487Z TRACE No requires-python found in pyproject.toml hook=check-yaml
2026-02-27T21:55:30.419511Z TRACE No requires-python found in pyproject.toml hook=check-added-large-files
2026-02-27T21:55:30.419551Z DEBUG Hooks going to run: ["trailing-whitespace", "end-of-file-fixer", "check-yaml", "check-added-large-files"]
2026-02-27T21:55:30.420181Z TRACE Executing `/home/tyilo/.cache/prek/hooks/python-3PE6vo5yP3x8AUMCdAmx/bin/python -I -c import sys, json
info = {
"version": ".".join(map(str, sys.version_info[:3])),
"base_exec_prefix": sys.base_exec_prefix,
}
print(json.dumps(info))
[...]`
2026-02-27T21:55:30.420365Z WARN Skipping unhealthy installed hook err=Failed to query Python info path=/home/tyilo/.cache/prek/hooks/python-3PE6vo5yP3x8AUMCdAmx
2026-02-27T21:55:30.420410Z TRACE Executing `/usr/bin/python3.14 -I -c import sys, json
info = {
"version": ".".join(map(str, sys.version_info[:3])),
"base_exec_prefix": sys.base_exec_prefix,
}
print(json.dumps(info))
[...]`
2026-02-27T21:55:30.442221Z DEBUG Found installed environment for hook `trailing-whitespace` at `/home/tyilo/.cache/prek/hooks/python-jQHCRPydOfqV1AsIw5zQ`
2026-02-27T21:55:30.442246Z DEBUG Found installed environment for hook `end-of-file-fixer` at `/home/tyilo/.cache/prek/hooks/python-jQHCRPydOfqV1AsIw5zQ`
2026-02-27T21:55:30.442250Z DEBUG Found installed environment for hook `check-yaml` at `/home/tyilo/.cache/prek/hooks/python-jQHCRPydOfqV1AsIw5zQ`
2026-02-27T21:55:30.442253Z DEBUG Found installed environment for hook `check-added-large-files` at `/home/tyilo/.cache/prek/hooks/python-jQHCRPydOfqV1AsIw5zQ`
2026-02-27T21:55:30.442295Z TRACE Released lock path=/home/tyilo/.cache/prek/.lock
2026-02-27T21:55:30.442314Z TRACE collect_files:ls_files{cwd="/tmp/foo" path="/tmp/foo"}: Executing `cd /tmp/foo && /usr/bin/git ls-files -z -- /tmp/foo`
2026-02-27T21:55:30.443466Z TRACE collect_files:ls_files{cwd="/tmp/foo" path="/tmp/foo"}: close time.busy=247µs time.idle=906µs
2026-02-27T21:55:30.443484Z TRACE collect_files: close time.busy=273µs time.idle=905µs
Summary
Test:
Willing to submit a PR?
Platform
Arch Linux
Version
prek 0.3.3
.pre-commit-config.yaml
Log file