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 }}
Repository navigation
UnboundLocalError: local variable 's' referenced before assignment #1016
When mouse clicking in root locus plot outside in the border region of the window I get this:
Traceback (most recent call last):
File "C:\Users\me\PycharmProjects\f\venv\lib\site-packages\matplotlib\cbook.py", line 298, in process
func(*args, **kwargs)
File "C:\Users\me\PycharmProjects\f\venv\lib\site-packages\control\pzmap.py", line 470, in _click_dispatcher
K, s = _find_root_locus_gain(event, sys, ax)
File "C:\Users\me\PycharmProjects\f\venv\lib\site-packages\control\pzmap.py", line 531, in _find_root_locus_gain
return None, s
UnboundLocalError: local variable 's' referenced before assignment
This worked OK for me on the main branch with Python 3.12 and matplotlib 3.8.4 using iPython.
Can you post the versions of Python, control and matplotlib that you are using, along with the execution environment (python, iPython, Jupyter) that you are using, so we can narrow things down?
Activity
murrayrm commentedon Jun 29, 2024
This worked OK for me on the main branch with Python 3.12 and matplotlib 3.8.4 using iPython.
Can you post the versions of Python, control and matplotlib that you are using, along with the execution environment (python, iPython, Jupyter) that you are using, so we can narrow things down?
NikolaiVChr commentedon Jun 30, 2024
Control v0.10.0
Numpy 1.26.4
Scipy 1.14.0
matplotlib 2.9.0
PyCharm 2023.2.3
Python 3.10
Python env
fix bug in root_locus_plot identified by @NikolaiVChr in issue python…
Merge pull request #1021 from murrayrm/rlocus_bug-30Jun2024