Closed JostMigenda closed 1 month ago
Thank you @JostMigenda for your prompt response and for taking the necessary actions regarding the reported issue with SNEWPY. I'm glad to see that a pull request has been submitted to address it.
@Riya-Gaba Thanks for reporting this! I've just made a v1.5.1 release including this bugfix; please update and enjoy snewpy!
[Received this bug report via email from a user.]
The following example (simplified version of
SNOwGLoBES_usage.ipynb
, but with a different model):fails with the following error message:
The issue is in the line
self.metadata.update(*self._metadata_from_filename(filename))
. Metadata is a dictionary, anddict.update
expects either a single argument of type dict, or a set of keyword arguments. However,*self._metadata_from_filename(filename)
returns an iterable ofdict.keys()
; we could either drop the*
to pass in the raw dict or use**
to pass the dict as a series of kwargs.This appears to affect all models that define
_metadata_from_filename
. I’ll prepare a PR with a fix.