PrincetonUniversity/Iseult

Looping Issue

adamtrobbins opened this issue · 2 comments

Zooming in a plot and then playing the simulation does not seem to work. To reproduce the bug, one can do the following:

  1. Start Iseult in '/scratch/gpfs/ar3676/9_test_sigma_0.3_r/output'
  2. Zoom in on the upper-right plot (using the Zoom to rectangle feature)
  3. Hit 'Play'

I get the following errors:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/licensed/anaconda3/2024.2/lib/python3.11/tkinter/__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 466, in PlayHandler
    self.parent.RenewCanvas()
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 3003, in RenewCanvas
    self.RefreshCanvas(keep_view = keep_view)
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 3228, in RefreshCanvas
    self.SaveView()
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 2888, in SaveView
    num_changed = home_view[i][j]-cur_view[i][j] != 0.0
                  ~~~~~~~~~~~~^^^
KeyError: 0
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/licensed/anaconda3/2024.2/lib/python3.11/tkinter/__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 558, in UpdateValue
    self.param.set(int(self.slider.get()))
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 320, in set
    feedbackKnob.setKnob(self.value)
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 3540, in setKnob
    self.RenewCanvas()
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 3003, in RenewCanvas
    self.RefreshCanvas(keep_view = keep_view)
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 3228, in RefreshCanvas
    self.SaveView()
  File "/home/ar3676/Desktop/bob-iseult/src/main_app.py", line 2888, in SaveView
    num_changed = home_view[i][j]-cur_view[i][j] != 0.0
                  ~~~~~~~~~~~~^^^
KeyError: 0

This is correct. Iseult was written using some matplotlib protected members and matplotlib has changed the format and internal usage of those members as of v3.8. I haven't figured out a good way around that yet so for now we're locked to a specific version of matplotlib; see Issue #15 for some more details.

You can either use the anaconda module that @ntoles mentioned or, the recommended method, use the latest Anaconda module available and create an environment for Iseult using the environment.yml in the repository root directory. Instructions are in the Readme and more details are in the environment.yml file. Using the environment will let you use the latest version of all the other packages that work with the required version of Matplotlib.