---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
/tmp/ipykernel_12019/1201040965.py in <module>
5 grbtime,
6 ebounds=ebounds,
----> 7 sgl_type="both",
8 )
~/miniconda3/envs/threeML/lib/python3.7/site-packages/pyspi/utils/data_builder/time_series_builder.py in from_spi_grb(cls, name, det, time_of_grb, ebounds, response, sgl_type, restore_background, poly_order, verbose)
796 ebounds,
797 time_of_grb,
--> 798 sgl_type=sgl_type)
799
800 event_list = EventListWithLiveTime(
~/miniconda3/envs/threeML/lib/python3.7/site-packages/pyspi/utils/data_builder/time_series_builder.py in __init__(self, det, ebounds, time_of_grb, sgl_type)
400 self._sgl_type = sgl_type
401 # Find the SW ID of the data file we need for this time
--> 402 self._pointing_id = find_needed_ids(self._time_of_GRB)
403
404 # Get the data, either from afs or from ISDC archive
~/miniconda3/envs/threeML/lib/python3.7/site-packages/pyspi/utils/function_utils.py in find_needed_ids(time)
90 # Path to file, which contains id information and start and stop
91 # time
---> 92 id_file_path = os.path.join(get_path_of_internal_data_dir(),
93 'id_data_time.hdf5')
94
~/miniconda3/envs/threeML/lib/python3.7/site-packages/pyspi/io/package_data.py in get_path_of_internal_data_dir()
15 Get path to the external data directory (mostly to store data there)
16 """
---> 17 file_path = os.environ['PYSPI_PACKAGE_DATA']
18
19 return file_path
~/miniconda3/envs/threeML/lib/python3.7/os.py in __getitem__(self, key)
679 except KeyError:
680 # raise KeyError with the original key value
--> 681 raise KeyError(key) from None
682 return self.decodevalue(value)
683
KeyError: 'PYSPI_PACKAGE_DATA'
export PYSPI=/home/jisans/workspace/external/datafolder
export PYSPI
export PYSPI_PACKAGE_DATA=/home/jisans/workspace/internal/data
export PYSPI_PACKAGE_DATA