Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - SPICE Failing to Load Metakernel #830

Closed
Tracked by #975
sdhoyt opened this issue Sep 12, 2024 · 0 comments · Fixed by #838
Closed
Tracked by #975

BUG - SPICE Failing to Load Metakernel #830

sdhoyt opened this issue Sep 12, 2024 · 0 comments · Fixed by #838
Assignees
Labels
bug Something isn't working SPICE Related to SPICE

Comments

@sdhoyt
Copy link
Contributor

sdhoyt commented Sep 12, 2024

Description of the issue

When running imap-cli to kick off processing, the SPICE code used by the packet_files_to_dataset function is producing the following error:

 File "/Users/seho5886/repos/imap_processing/imap_processing/utils.py", line 386, in packet_file_to_datasets
    time_data = met_to_j2000ns(data[time_key])
  File "/Users/seho5886/repos/imap_processing/imap_processing/spice/time.py", line 44, in met_to_j2000ns
    return np.asarray(_sct2e_wrapper(sclk_ticks) * 1e9, dtype=np.int64)
  File "/Users/seho5886/repos/imap_processing/imap_processing/spice/kernels.py", line 157, in wrapper_ensure_spice
    raise SpiceyError(
spiceypy.utils.exceptions.SpiceyError: 
When calling a function requiring SPICE, we failedto load a metakernel. SPICE_METAKERNEL is not set,and time_kernels_only is not set to True --

Steps to reproduce the issue

Setup your repository to use commit e6b4dae from this PR: #788

Upload this L0 to the SDC if needed:
imap_lo_l0_raw_20240728_v001.pkts.zip

Then run:

imap_cli --instrument lo --data-level l1a --start-date 20240728 --version v001 --dependency "[{'instrument': 'lo', 'data_level': 'l0', 'descriptor': 'raw', 'version': 'v001','start_date': '20240728'}]"

Expected behavior (What should happen)

Processing should run without error and CDF should be created

Actual behavior (What does happen)

The following error is produced:

 File "/Users/seho5886/repos/imap_processing/imap_processing/utils.py", line 386, in packet_file_to_datasets
    time_data = met_to_j2000ns(data[time_key])
  File "/Users/seho5886/repos/imap_processing/imap_processing/spice/time.py", line 44, in met_to_j2000ns
    return np.asarray(_sct2e_wrapper(sclk_ticks) * 1e9, dtype=np.int64)
  File "/Users/seho5886/repos/imap_processing/imap_processing/spice/kernels.py", line 157, in wrapper_ensure_spice
    raise SpiceyError(
spiceypy.utils.exceptions.SpiceyError: 
When calling a function requiring SPICE, we failedto load a metakernel. SPICE_METAKERNEL is not set,and time_kernels_only is not set to True --

Code Snippet:

Code

Additional notes, affected areas, and suggested fixes

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SPICE Related to SPICE
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants