SeismicData / pyasdf

Python Interface to ASDF based on ObsPy
http://seismicdata.github.io/pyasdf/
BSD 3-Clause "New" or "Revised" License
53 stars 30 forks source link

adding an existing StationXML throws TypeError #59

Closed bch0w closed 4 years ago

bch0w commented 4 years ago

https://github.com/SeismicData/pyasdf/blob/8431d2d185ab3b3c94b0f82bccf3f79fc3769456/pyasdf/inventory_utils.py#L144

Trying to run set() on a list of Comments throws a TypeError: unhashable type: 'Comment'

I encountered this when trying to add a StationXML with a list of comments that was already contained in the dataset.

It would be nice if it threw an ASDFWarning, similar to when adding waveform data already contained in the dataset.

krischer commented 4 years ago

Hi @bch0w

the just released pyasdf 0.7.0 is a bit more conservative when merging inventory objects which should also fix that particular issue. Please let me know if that is not the case.

Cheers!