Mercurial > code > home > repos > light9
changeset 2328:d050b8efda9d
fix bug with uninitialized effect ,and prefer a dead effect over a graph reload
author | drewp@bigasterisk.com |
---|---|
date | Thu, 01 Jun 2023 18:42:36 -0700 |
parents | bbd79e655114 |
children | c5cd51e32fc5 |
files | light9/effect/effecteval2.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/effect/effecteval2.py Thu Jun 01 18:32:03 2023 -0700 +++ b/light9/effect/effecteval2.py Thu Jun 01 18:42:36 2023 -0700 @@ -1,3 +1,4 @@ +import traceback import inspect import logging from dataclasses import dataclass @@ -38,7 +39,7 @@ self.graph.addHandler(self._compile) def _compile(self): - self.effectFunction = None + self.config = None if not self.graph.contains((self.uri, RDF.type, L9['Effect'])): return @@ -75,7 +76,7 @@ self.config = Config(effectFunction, esettings, devSettings, func, funcArgs) except Exception: log.error(f"while compiling {self.uri}") - raise + traceback.print_exc() def compute(self, songTime: float, inputs: EffectSettings) -> DeviceSettings: """