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
Describe the bug
I try running snipergw for a GRB230430A and it throws an uninformative error when it attempts to download the map - it is not clear whether no map is available or there is a bug in the code.
To Reproduce
Steps to reproduce the behavior:
Run python -m snipergw -e GRB230430A
See error -
INFO:snipergw.skymap:Found multiple events. Will choose the one corresponding the GRB letter A
https://heasarc.gsfc.nasa.gov/FTP/fermi/data/gbm/triggers/2023/bn230430196/current/ ['?C=N;O=D', '?C=M;O=A', '?C=S;O=A', '?C=D;O=A', '/FTP/fermi/data/gbm/triggers/2023/bn230430196/', 'glg_cspec_b0_bn230430196_v00.pha', 'glg_cspec_b1_bn230430196_v00.pha', 'glg_cspec_n0_bn230430196_v00.pha', 'glg_cspec_n1_bn230430196_v00.pha', 'glg_cspec_n2_bn230430196_v00.pha', 'glg_cspec_n3_bn230430196_v00.pha', 'glg_cspec_n4_bn230430196_v00.pha', 'glg_cspec_n5_bn230430196_v00.pha', 'glg_cspec_n6_bn230430196_v00.pha', 'glg_cspec_n7_bn230430196_v00.pha', 'glg_cspec_n8_bn230430196_v00.pha', 'glg_cspec_n9_bn230430196_v00.pha', 'glg_cspec_na_bn230430196_v00.pha', 'glg_cspec_nb_bn230430196_v00.pha', 'glg_ctime_b0_bn230430196_v00.pha', 'glg_ctime_b1_bn230430196_v00.pha', 'glg_ctime_n0_bn230430196_v00.pha', 'glg_ctime_n1_bn230430196_v00.pha', 'glg_ctime_n2_bn230430196_v00.pha', 'glg_ctime_n3_bn230430196_v00.pha', 'glg_ctime_n4_bn230430196_v00.pha', 'glg_ctime_n5_bn230430196_v00.pha', 'glg_ctime_n6_bn230430196_v00.pha', 'glg_ctime_n7_bn230430196_v00.pha', 'glg_ctime_n8_bn230430196_v00.pha', 'glg_ctime_n9_bn230430196_v00.pha', 'glg_ctime_na_bn230430196_v00.pha', 'glg_ctime_nb_bn230430196_v00.pha', 'glg_lc_all_bn230430196_v01.gif', 'glg_lc_chan12_bn230430196_v01.pdf', 'glg_lc_chan34_bn230430196_v01.pdf', 'glg_lc_chan567_bn230430196_v01.pdf', 'glg_lc_chantot_bn230430196_v01.pdf', 'glg_lc_hires12_bn230430196_v01.gif', 'glg_lc_hires34_bn230430196_v01.gif', 'glg_lc_hires567_bn230430196_v01.gif', 'glg_lc_lores12_bn230430196_v01.gif', 'glg_lc_lores34_bn230430196_v01.gif', 'glg_lc_lores567_bn230430196_v01.gif', 'glg_lc_medres12_bn230430196_v01.gif', 'glg_lc_medres34_bn230430196_v01.gif', 'glg_lc_medres567_bn230430196_v01.gif', 'glg_lc_tot_bn230430196_v01.pdf', 'glg_lc_zxradec_bn230430196_v01.gif', 'glg_tcat_all_bn230430196_v00.fit', 'glg_trigdat_all_bn230430196_v02.fit', 'glg_tte_b0_bn230430196_v00.fit', 'glg_tte_b1_bn230430196_v00.fit', 'glg_tte_n0_bn230430196_v00.fit', 'glg_tte_n1_bn230430196_v00.fit', 'glg_tte_n2_bn230430196_v00.fit', 'glg_tte_n3_bn230430196_v00.fit', 'glg_tte_n4_bn230430196_v00.fit', 'glg_tte_n5_bn230430196_v00.fit', 'glg_tte_n6_bn230430196_v00.fit', 'glg_tte_n7_bn230430196_v00.fit', 'glg_tte_n8_bn230430196_v00.fit', 'glg_tte_n9_bn230430196_v00.fit', 'glg_tte_na_bn230430196_v00.fit', 'glg_tte_nb_bn230430196_v00.fit']
INFO:snipergw.skymap:Downloading skymap and saving to /Users/viraj/Data/snipergw/skymaps/glg_tte_nb_bn230430196_v00.fit
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/Users/viraj/snipergw/snipergw/__main__.py", line 48, in <module>
run_snipergw(
File "/Users/viraj/snipergw/snipergw/run.py", line 36, in run_snipergw
skymap = Skymap(event_config=event)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/viraj/snipergw/snipergw/skymap.py", line 57, in __init__
self.skymap_path, self.event_name = self.get_grb_skymap(
^^^^^^^^^^^^^^^^^^^^
File "/Users/viraj/snipergw/snipergw/skymap.py", line 156, in get_grb_skymap
wget.download(final_link, str(skymap_path))
^^^^^^^^^^
UnboundLocalError: cannot access local variable 'final_link' where it is not associated with a value
Expected behavior
Downloads map, or raises a reasonable exception if not available.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
I try running snipergw for a GRB230430A and it throws an uninformative error when it attempts to download the map - it is not clear whether no map is available or there is a bug in the code.
To Reproduce
Steps to reproduce the behavior:
python -m snipergw -e GRB230430A
Expected behavior
Downloads map, or raises a reasonable exception if not available.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: