pyramidscheme / pyramidtriangles

Software to run the Pyramid Scheme triangles
3 stars 0 forks source link

Show Runner Crashes an Ceases Playing Shows When Exceptions Hit It #13

Closed johnemajor closed 5 years ago

johnemajor commented 5 years ago

gotri OneByOne . (one by one starts) go to cherrypy interface, select Random (random starts go to cherrypy interface choose UpDown ... show runner crashes and no show plays.

This is the visible stacktrace from the runner

INFO:cherrypy.access.4484800208:127.0.0.1 - - [15/Aug/2019:01:29:40] "GET / HTTP/1.1" 200 1539 "http://localhost:9990/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36" next show: UpDown ERROR - unexpected exception in show loop! Traceback (most recent call last): File "go_tri.py", line 180, in run d = self.get_next_frame() File "go_tri.py", line 167, in get_next_frame return next(self.framegen) File "/Users/jmajor/projects/PT/Z/pyramidtriangles/shows/up_down.py", line 19, in next_frame self.grid.set(pointed(orientation), color) File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 72, in set for pixel in self.pixels(sel): File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 67, in pixels for cell in self.select(sel): File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 58, in select raise TypeError(f'invalid Cell selector {sel}') TypeError: invalid Cell selector None ERROR:pyramidtriangles:unexpected exception in show loop! Traceback (most recent call last): File "go_tri.py", line 180, in run d = self.get_next_frame() File "go_tri.py", line 167, in get_next_frame return next(self.framegen) File "/Users/jmajor/projects/PT/Z/pyramidtriangles/shows/up_down.py", line 19, in next_frame self.grid.set(pointed(orientation), color) File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 72, in set for pixel in self.pixels(sel): File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 67, in pixels for cell in self.select(sel): File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 58, in select raise TypeError(f'invalid Cell selector {sel}') TypeError: invalid Cell selector None Exception in thread ShowRunner: Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "go_tri.py", line 180, in run d = self.get_next_frame() File "go_tri.py", line 167, in get_next_frame return next(self.framegen) File "/Users/jmajor/projects/PT/Z/pyramidtriangles/shows/up_down.py", line 19, in next_frame self.grid.set(pointed(orientation), color) File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 72, in set for pixel in self.pixels(sel): File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 67, in pixels for cell in self.select(sel): File "/Users/jmajor/projects/PT/Z/pyramidtriangles/grid/grid.py", line 58, in select raise TypeError(f'invalid Cell selector {sel}') TypeError: invalid Cell selector None

The show runner's behavior should be to gracefully handle any crashed shows and move on to the next one (and continue to move on until no shows will run successfully). This was a core design goal of the show runner, to be robust for running for hours and hours unattended, gracefully moving to the next show when the current one fails. We found this to be a critical feature b/c as our shows grew in complexity, the edge cases causing them to crash increased and we will not always be around to manually go re-start things.

johnemajor commented 5 years ago

This is not a request to fix the show, but to restore the fault tolerance in the show runner.

johnemajor commented 5 years ago

Another non-bug. Fail hard was set to True by default, it should be False for production running.