From 0162bfa92a00c974746c16d5b94fd97626600b61 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 15 May 2026 16:14:53 +0100 Subject: [PATCH] Enhance troubleshooting details for Pyright errors Added information about cache corruption and invalid path errors in Pyright. --- doc/scripting/genie_python/genie_python-Troubleshooting.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/scripting/genie_python/genie_python-Troubleshooting.md b/doc/scripting/genie_python/genie_python-Troubleshooting.md index eaff08b96..4076cac65 100644 --- a/doc/scripting/genie_python/genie_python-Troubleshooting.md +++ b/doc/scripting/genie_python/genie_python-Troubleshooting.md @@ -125,3 +125,5 @@ But this is not recommended for obvious reasons. Pyright keeps a cache directory in `c:\Users\\.cache\pyright-python`, this can get corrupted, if it does get corrupted pyright will entirely fail to execute. This cache directory can be deleted (at the cost of the next script-check operation being much slower). Error from {external+genie_python:py:obj}`g.load_script ` will be a `json.decoder.JSONDecodeError` as pyright does not return JSON in this case (but rather, returns some non-JSON error message). + +Pyright may also give an error about a corrupted cache if {external+genie_python:py:obj}`g.load_script ` is called with an invalid path such as `z:a.py` (instead of the correct `z:/a.py`).