Error with the qopen: event depth missing

Greetings

I am writing to ask you very kindly if you can help me with the following error

C:\Users\cxecx>qopen go -v --prefix “01_go/”
Traceback (most recent call last):
File “C:\Users\cxecx\anaconda3\lib\runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Users\cxecx\anaconda3\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\Users\cxecx\anaconda3\Scripts\qopen.exe_main
.py", line 7, in
File “C:\Users\cxecx\anaconda3\lib\site-packages\qopen\core.py”, line 2091, in run_cmdline
run(**args)
File “C:\Users\cxecx\anaconda3\lib\site-packages\qopen\core.py”, line 1902, in run
result = invert_wrapper(noplots=align_sites, **args)
File “C:\Users\cxecx\anaconda3\lib\site-packages\qopen\core.py”, line 1475, in invert_wrapper
o.depth / 1000, mag, o.time)
TypeError: unsupported operand type(s) for /: ‘NoneType’ and ‘int’

I thank you very much for your help

Sergio Arias Buitrago

Hi Sergio,

to read the error traceback, you have to start from the end: o.depth / 1000 together with the error message gives a good hint on what is going on. o.depth is None meaning that no depth is associated with the earthquake origin.

Can you check your earthquake catalog? What is its format? Does it provide a depth for the events?

You can use the --pdb command line flag to start a debugger when the code throws an error.

hi.

thank you very much for your help.

Regarding your questions, I must tell you that: I have the event catalog, it is in XML format but these events do not have depth, I assume that for this reason it does not execute my code.

Is there anything I can do to solve this problem?

Event depth is crucial for local earthquakes. You definitely need those.

1 Like

Hi.

Thank you so much for your help, I think that I need to write to the people who have that events for ask: ¿why they don’t have a depth.?

But, I understand better everything about qopen code, so, i really appreciate it…

Thank you so much.

Sergio Arias B
Geologist