From 58b2967f53fe6a272414a206c041aa393f2046da Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Mon, 7 Dec 2020 10:12:30 +0000 Subject: [PATCH] Fixed autofocus 'PiCameraStreamer' object has no attribute 'annotate_text' error --- openflexure_microscope/api/default_extensions/autofocus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openflexure_microscope/api/default_extensions/autofocus.py b/openflexure_microscope/api/default_extensions/autofocus.py index 91fe08fb..339291ca 100644 --- a/openflexure_microscope/api/default_extensions/autofocus.py +++ b/openflexure_microscope/api/default_extensions/autofocus.py @@ -201,7 +201,7 @@ class AutofocusExtension(BaseExtension): positions: List[int] = [] # Some cameras may not have annotate_text. Reset if it does - if getattr(camera, "annotate_text"): + if getattr(camera, "annotate_text", None): setattr(camera, "annotate_text", "") for _ in stage.scan_z(dz, return_to_start=False):