BU-hammerTeam / PyHammer

A Python Spectral Typing Suite
MIT License
53 stars 14 forks source link

PyHammer Crash/Does not Run when running example PyHammer script #44

Open thaynecurrie opened 3 years ago

thaynecurrie commented 3 years ago

I have installed PyHammer and have verified that I have sufficiently updated versions of packages.

Unfortunately, PyHammer crashes and I cannot run it, even when attempting to run the example script provided in the wiki

  1. (from command line) python pyhammer.py -f -l -i test_case/exampleInputFile.txt

  2. the GUI pops up. I click on "Start PyHammer"

  3. after two warnings about creating "an ndarray from ragged nested sequence(s)", I get the following crash:

Traceback (most recent call last): File "pyhammer.py", line 864, in goToMain main(self.options) File "pyhammer.py", line 232, in main Eyecheck(spec, options) File "/Users/thaynecurrie/Research/Data/stellar/PyHammer/eyecheck.py", line 24, in init self.updatePlot() # Update the plot showing the template and spectrum File "/Users/thaynecurrie/Research/Data/stellar/PyHammer/eyecheck.py", line 659, in updatePlot if self.toolbar._active != 'ZOOM': AttributeError: 'NavigationToolbar2QT' object has no attribute '_active' Abort

The crash occurs regardless of whether I run in command line mode (-c), GUI (-g), or full (-f)

zephyr5050 commented 3 years ago

This is a duplicate of Issue #40. Essentially, newer versions of matplotlib have depreciated a feature the eyeplot was trying to use. Ideally a fix should be added to the repository, but as a simple fix on your end, try going to Line 659 in eyecheck.py and changing _active to _actions. That should work. At worst, you can just comment out that entire if statement as it's only there as a nice-to-have feature and not critical.

Hope that helps!

achillefiore commented 2 years ago

Hi, I've just downloaded this very nice tool, I fixed the line 659 in eyecheck.py as you told. Apparently now it works, but as soon as I try to re-size the GUI it crashes as before.

Schermata 2021-11-16 alle 18 50 08