I'm trying to use the internal transitions feature of pytransitions version 0.6.4 but it is not working for me. I get an error
File "/python3.6/site-packages/transitions/core.py", line 720, in set_state
mod.state = state.name
AttributeError: 'NoneType' object has no attribute 'name'
I tweaked the code here
mod.state = state.name if state else mod.state
but then it errored elsewhere so I'm not sure if this feature is known to have problems.
I'm initialising the machine with a list of dicts as its transitions kwarg. An example of one dict is and I believe this is the correct format.
{'trigger': 'cartridge_present_switch', 'source': 'post', 'dest': None, 'before': 'on_cartridge_present_switch'}
Although the docs only show a transition added with the add_transition method as follows
machine.add_transition('internal', ['liquid', 'gas'], None, after='change_shape')
Can anybody comment on the internal transitions feature?
Thanks, John