-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when used with %autoreload #257
Comments
Hi @xiao-fred, thanks for reporting this. Can you please provide a notebook and your requirements with exact versions, so I can try for myself? I'm not familiar with autoreload but can try to find a fix. |
May I join the issue? I installed the library with
Weird. |
@xiao-fred I run the following steps (OS Linux distribution Ubuntu 20.04):
|
Closing as stale. If you still need help please open a new issue. |
Description
I am using
statemachine
in a project, with Jupyter notebook and the IPython%autoreload
extension.I have been using Jupyter and
autoreload
for years, and I haven't met any serious problem until now. But it leads to a systematic exception instatemachine
. And unless it can be solved, I will have to give upstatemachine
, since there is no way I give up Jupyter andautoreload
...What I Did
Create two files:
File 1: my_state_machine.py
File 2: Jupyter notebook
Create 2 cells:
Cell #1
Cell #2
Execute both cells (cell #1 then cell #2). It's working. Fine.
Execute cell #2 once again. It's working too. Fine.
Now modify
my_state_machine.py
. No need to modify the states or transitions. Just modify thedo_something()
method:Now run cell #2 once again.
Autoreload
automatically reloads thestatemachine
module. But obviously something goes wrong, and systematically leads to an exception:Here's a (partial) callstack showing when autoreload is invoking
Transition._ _ get _ _()
with a Nonemachine
parameter, eventually leading to an exception, next time the transition is invoked. Unfortunately I am not familiar enough with autoreload or your own code to understand what is the expected workflow...The text was updated successfully, but these errors were encountered: