Skip to content

_checked_assignment: Skip binding o Machine initialization #615

Closed Answered by aleneum
mahadi asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @mahadi,

I cannot reproduce your observations with the info provided. Could you assemble an MRE? The warnings you see are usually emitted if you attempt to bind the same model twice by passing it to two different machines with similar or identical state configurations or by calling Machine.add_model with an already bound model.

class Model:
   ...

m = Model()
m1 = Machine(model=m, states=states)
m2 = Machine(model=m, states=states)  # <-- emits warnings
m1.add_model(m) # <-- emits warning

Also while adding and removing models their decoration is not removed. See API doc states:

Remove a model from the state machine. The model will still contain all previously added triggers
and ca…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mahadi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants