Back with another issue. I'm trying to dynamically assign the angles for an ellipse in MC/Kivy and MPF is throwing an exception and crashing. Here's the relevant config:
I have a variable player that does some math (I'm simplifying here, I actually have multiple entries in the variable_player for this variable where it tests for zeros and returns a zero, and tests for excess hits and limits it to a max result of 360 so it can't overrun the ellipse angle, so it's not a masked divide by zero or some overrun type of error; if I put the value into a text widget I see exactly what I expect to see):
I've tried that angle_end: line with apostrophes instead of quotation marks and without any string identifiers at all (just parens)... same error in all cases. When the game runs and crashes, I get the following stack trace in the MC log. Any thoughts on what I can do to get this working, or is it just not possible? I know it's that variable line causing the crash, because if I just use a straight up number like 180, it draws fine.
025-12-02 12:04:03,896 : root : Exception while processing RegisteredHandler(callback=<bound method McConfigPlayer.play_from_trigger of McConfigPlayer.widgets>, priority=1, kwargs={}, key=UUID('c36fab15-d512-42ca-86a0-3a15738d8676'), condition=None, blocking_facility=None) for event widgets_play. no default __reduce__ due to non-trivial __cinit__
Traceback (most recent call last):
File "D:\dev\MLH\vmpf\lib\site-packages\mpf\core\events.py", line 755, in _run_handlers
result = handler.callback(**merged_kwargs)
File "D:\dev\MLH\vmpf\lib\site-packages\mpfmc\core\mc_config_player.py", line 56, in play_from_trigger
self.play(settings=settings, context=context, calling_context=calling_context, priority=priority, **kwargs)
File "D:\dev\MLH\vmpf\lib\site-packages\mpfmc\config_players\widget_player.py", line 157, in play
self._action_add(s, instance_dict, widget, context, kwargs)
File "D:\dev\MLH\vmpf\lib\site-packages\mpfmc\config_players\widget_player.py", line 105, in _action_add
slide.add_widgets_from_library(name=widget, play_kwargs=play_kwargs, **s)
File "D:\dev\MLH\vmpf\lib\site-packages\mpfmc\uix\slide.py", line 138, in add_widgets_from_library
widgets_added = create_widget_objects_from_config(config=self.mc.widgets[name],
File "D:\dev\MLH\vmpf\lib\site-packages\mpfmc\uix\widget.py", line 901, in create_widget_objects_from_config
widget_obj = mc.widgets.type_map[widget['type']](
File "D:\dev\MLH\vmpf\lib\site-packages\mpfmc\widgets\ellipse.py", line 25, in __init__
super().__init__(mc=mc, config=config, key=key)
File "D:\dev\MLH\vmpf\lib\site-packages\mpfmc\uix\widget.py", line 69, in __init__
self.config = deepcopy(config)
File "C:\Program Files\Python39\lib\copy.py", line 146, in deepcopy
y = copier(x, memo)
File "C:\Program Files\Python39\lib\copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Program Files\Python39\lib\copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "C:\Program Files\Python39\lib\copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "C:\Program Files\Python39\lib\copy.py", line 146, in deepcopy
y = copier(x, memo)
File "C:\Program Files\Python39\lib\copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Program Files\Python39\lib\copy.py", line 146, in deepcopy
y = copier(x, memo)
File "C:\Program Files\Python39\lib\copy.py", line 237, in _deepcopy_method
return type(x)(x.__func__, deepcopy(x.__self__, memo))
File "C:\Program Files\Python39\lib\copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "C:\Program Files\Python39\lib\copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "C:\Program Files\Python39\lib\copy.py", line 146, in deepcopy
y = copier(x, memo)
File "C:\Program Files\Python39\lib\copy.py", line 210, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "C:\Program Files\Python39\lib\copy.py", line 210, in <listcomp>
y = [deepcopy(a, memo) for a in x]
File "C:\Program Files\Python39\lib\copy.py", line 146, in deepcopy
y = copier(x, memo)
File "C:\Program Files\Python39\lib\copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Program Files\Python39\lib\copy.py", line 161, in deepcopy
rv = reductor(4)
File "stringsource", line 2, in kivy._event.EventDispatcher.__reduce_cython__
TypeError: no default __reduce__ due to non-trivial __cinit__