Error with QuakeML file: events with the same origin time

Greetings,

I have a QuakeML file that was created from the conversion of all S files with events within a year by using nor2qml tool from SEISAN. When I use this QuakeML file as input in Qopen, the following error appears:

Traceback (most recent call last):
File “C:\Users\carli\anaconda3\envs\qenv\lib\runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Users\carli\anaconda3\envs\qenv\lib\runpy.py”, line 86, in run_code
exec(code, run_globals)
File "C:\Users\carli\anaconda3\envs\qenv\Scripts\qopen.exe_main
.py", line 7, in
File “C:\Users\carli\anaconda3\envs\qenv\lib\site-packages\qopen\core.py”, line 2091, in run_cmdline
run(**args)
File “C:\Users\carli\anaconda3\envs\qenv\lib\site-packages\qopen\core.py”, line 1902, in run
result = invert_wrapper(noplots=align_sites, **args)
File “C:\Users\carli\anaconda3\envs\qenv\lib\site-packages\qopen\core.py”, line 1461, in invert_wrapper
events = list(zip(*sorted(time_event_pairs)))[1]
TypeError: ‘<’ not supported between instances of ‘Event’ and ‘Event’

I appreciate your help if you could tell me what could be wrong with the QuakeML file. I already checked that Obspy could read the events within it without problems. Further, I appreciate any suggestions about the conversion.

Kind regards,

Carlos.

Hi Carlos,

this is an interesting error.

Upon inspection of the code, I think this error can only occur if two events in the catalog are present with exactly the same origin time. Can you check your catalog?

Edit: You can debug such errors with the --pdb flag. For example qopen go --pdb ..., then a debugger should be started and you can check the variable time_event_pairs.

Best, Tom