hashpy
hashpy copied to clipboard
hashpy with obspy
Hi, I was trying to use hashpy with an input file from obspy and ran into an error below.
Traceback (most recent call last):
File "hashpyusage.py", line 23, in <module>
hp.input(event, format="OBSPY")
File "/Users/user/anaconda/lib/python2.7/site-packages/hashpy/hashpype.py", line 297, in input
inputter(self, data, *args, **kwargs)
File "/Users/user/anaconda/lib/python2.7/site-packages/hashpy/io/core.py", line 82, in __call__
return self._input(*args, **kwargs)
File "/Users/user/anaconda/lib/python2.7/site-packages/hashpy/io/obspyIO.py", line 31, in inputOBSPY
hp.tstamp = _o.time.timestamp
AttributeError: 'NoneType' object has no attribute 'time'
I'm running the usage example code Mark wrote here: https://github.com/markcwill/hashpy under Input/Output.
Has anyone encountered this before?
Sorry, for some reason, this got lost in my notifications. Looks like the origin you want to run HASH on is not set as preferred? I will add the option to take the first origin in Event.origins if there is no preferred one, but IMHO always better to specify...