zooniverse / aggregation-for-caesar

Apache License 2.0
9 stars 15 forks source link

Fix import for GUI #781

Closed lcjohnso closed 9 months ago

lcjohnso commented 9 months ago

As part of #743, the import and override of progressbar got mangled during refactoring. Originally, there were two separate imports of progressbar from extract_panoptes_csv and reduce_panoptes_csv as pbe and pbr, respectively. The refactor reduced this to one (pbe) but didn't remove references to pbr. This issue causes the GUI not to start due to an error related to these imports:

Traceback (most recent call last):
  File "/Users/johnson/anaconda3/envs/main/bin/panoptes_aggregation_gui", line 5, in <module>
    from panoptes_aggregation.scripts.gui import gui
  File "/Users/johnson/anaconda3/envs/main/lib/python3.11/site-packages/panoptes_aggregation/scripts/gui.py", line 26, in <module>
    panoptes_aggregation.scripts.pbar_override(panoptes_aggregation.scripts.pbr)
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'panoptes_aggregation.scripts' has no attribute 'pbr'. Did you mean: 'pbe'?

This PR makes the minor edit to change the import of progressbar to pb and to remove the duplicate pbar_override() call in scripts/gui.py.

CKrawczyk commented 9 months ago

Tested locally, the GUI now loads as expected.