PrincetonUniversity / Iseult

Python plotting program for Tristan-MP
https://princetonuniversity.github.io/Iseult/
GNU General Public License v3.0
7 stars 7 forks source link

Looping Issue #25

Closed adamtrobbins closed 1 month ago

adamtrobbins commented 1 month ago

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
ntoles commented 1 month ago

You need to load earlier anaconda, before 2023.9. Add "module load anaconda3/2023.9" to .bashrc and restart the shell (relogin or source ~/.bashrc)

Or you can use conda environment as explained on Iseult readme page.

On Mon, Aug 12, 2024 at 7:20 PM Adam Robbins @.***> wrote:

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

—
Reply to this email directly, view it on GitHub
<https://github.com/PrincetonUniversity/Iseult/issues/25>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASJ7FCK5FBGLHASV3GGJKLZRE7LZAVCNFSM6AAAAABMNC53ACVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3DEMBVGA3TQNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
bcaddy commented 1 month ago

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.