From a07a8e7d67720877307245c939b186b85422da8c Mon Sep 17 00:00:00 2001 From: Tam Dao Date: Sun, 7 Jul 2024 23:11:29 +0700 Subject: [PATCH] Update Document to check the /XYZ len --- src/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/__init__.py b/src/__init__.py index c51dd2560..76484b1cb 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -5305,7 +5305,11 @@ def get_array(val): if array.startswith("/XYZ"): del templ_dict["dest"] # don't return orig string in this case arr_t = array.split()[1:] - x, y, z = tuple(map(float, arr_t)) + if len(arr_t) == 3: + x, y, z = tuple(map(float, arr_t)) + else: + x, y = tuple(map(float, arr_t)) + z = 0 templ_dict["to"] = (x, y) templ_dict["zoom"] = z