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

MultiScene 'save_animation' fails if "datasets=" isn't provided #601

Closed
peters77 opened this issue Jan 31, 2019 · 1 comment · Fixed by #602
Closed

MultiScene 'save_animation' fails if "datasets=" isn't provided #601

peters77 opened this issue Jan 31, 2019 · 1 comment · Fixed by #602

Comments

@peters77
Copy link
Contributor

Describe the bug
making a multiscene fails if the dataset is not set in mscn.save_animation('......, datasets=['....'])

To Reproduce
my code:

os.environ['XRIT_DECOMPRESS_PATH'] = '/usr/bin/xRITDecompress'
scenes = []
for slot_files in group_files(glob('/msg4_test/H-000-MSG2__-MSG2*'), reader='seviri_l1b_hrit'):
     scenes.append(Scene(reader='seviri_l1b_hrit', filenames=slot_files))

mscn = MultiScene(scenes)
mscn.load(['IR_108'])

mscn.save_animation('/Pictures/test.mp4', fps=1)

Expected behavior
Multiscene should made and saved in to a .mp4 file

Actual results
Traceback (most recent call last):
File "msg4_test_multiscene_1.py", line 53, in
mscn.save_animation('/Pictures/test.mp4', fps=1)
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/multiscene.py", line 424, in save_animation
info_datasets = [scn.get(dataset_id) for scn in info_scenes]
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/multiscene.py", line 424, in
info_datasets = [scn.get(dataset_id) for scn in info_scenes]
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/scene.py", line 621, in get
return self.datasets.get(key, default)
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/readers/init.py", line 339, in get
key = self.get_key(key)
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/readers/init.py", line 322, in get_key
best=best, **dfilter)
File "/home/cpeters/anaconda2/envs/pytroll/lib/python3.6/site-packages/satpy/readers/init.py", line 239, in get_key
"not {}".format(str(type(key))))
ValueError: Expected 'DatasetID', str, or number dict key, not <class 'xarray.core.dataarray.DataArray'>

Environment Info:

  • OS: Linux
  • SatPy Version: satpy-0.11.2+43
@djhoese djhoese changed the title multiscene msc.save_animation failed with hrit data if "datasets=" isn't set MultiScene 'save_animation' fails if "datasets=" isn't provided Jan 31, 2019
@djhoese
Copy link
Member

djhoese commented Jan 31, 2019

Good news: I was able to reproduce this with ABI data. I'll see if I can make a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants