From 25c0b5d0b814ad2951141564a5cb8c204f1ae298 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 17 Jul 2024 20:31:18 +0100 Subject: [PATCH] Avoid path issues with `qmk flash` on Windows (#24130) --- lib/python/qmk/flashers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/python/qmk/flashers.py b/lib/python/qmk/flashers.py index 9ecb5e4b9c8f..7ee1bc8de73e 100644 --- a/lib/python/qmk/flashers.py +++ b/lib/python/qmk/flashers.py @@ -206,6 +206,8 @@ def _flash_uf2(file): def flasher(mcu, file): + # Avoid "expected string or bytes-like object, got 'WindowsPath" issues + file = file.as_posix() bl, details = _find_bootloader() # Add a small sleep to avoid race conditions time.sleep(1)