You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
However, automata-lib 7.0.1 returns a frozendict from the frozendict package instead, so the method call fails. It is not clear if copying the frozendict is at all necessary; deepcopy returns the object as-is.
Traceback (most recent call last):
File "/path/to/scratch_1.py", line 6, in <module>
VisualNFA(nfa).show_diagram(view=True)
File "/path/to/site-packages/visual_automata/fa/nfa.py", line 619, in show_diagram
all_transitions_pairs = self._transitions_pairs(self.nfa.transitions)
File "/path/to/site-packages/visual_automata/fa/nfa.py", line 469, in _transitions_pairs
all_transitions = all_transitions.deepcopy()
AttributeError: 'frozendict.frozendict' object has no attribute 'deepcopy'
The text was updated successfully, but these errors were encountered:
(Im-)mutability seems to be a larger issue with automata-lib 7. Since the automata-lib types are all immutable now, setters can not work as intended any more; also some protected attributes were renamed. I would be willing to try and write a patch for this, but my suggestion would be to
I haven't looked at this library or automata-lib for some time, but I think you are correct 👍🏻 I'll have a look at this today or tomorrow, depending on work.
The
VisualNFA
constructor attempts to create a deep copy of the passednfa
, especially thetransitions
dictionary:visual-automata/visual_automata/fa/nfa.py
Line 469 in 3ea0cdc
The
deepcopy
method is monkeypatched onto dict viacurse
:visual-automata/visual_automata/fa/nfa.py
Line 32 in 3ea0cdc
However, automata-lib 7.0.1 returns a
frozendict
from the frozendict package instead, so the method call fails. It is not clear if copying thefrozendict
is at all necessary;deepcopy
returns the object as-is.MRE
Using most recent versions:
Expected Behavior
The automaton is shown.
Actual Behavior
The text was updated successfully, but these errors were encountered: