[Bug 1101249] [NEW] oq-engine: Display source information (id, name) if an error occurs during source init

4 views
Skip to first unread message

Lars Butler

unread,
Jan 18, 2013, 10:23:02 AM1/18/13
to oqb...@foldr3.com
Public bug reported:

When sources are parsed and loaded into the DB, if something goes wrong,
with the geometry for example, there is no information to identify the
source of the error.

Here is an example of error message you might see in this case:

Traceback (most recent call last):
File "bin/openquake", line 471, in <module>
main()
File "bin/openquake", line 450, in main
args.force_inputs, args.exports)
File "bin/openquake", line 221, in run_hazard
completed_job = engine2.run_hazard(job, log_level, log_file, exports)
File "/usr/local/openquake/oq-engine/openquake/engine2.py", line 326, in run_hazard
return _run_calc(job, log_level, log_file, exports, calc, 'hazard')
File "/usr/local/openquake/oq-engine/openquake/engine2.py", line 393, in _run_calc
_do_run_calc(job, exports, calc, job_type)
File "/usr/local/openquake/oq-engine/openquake/engine2.py", line 467, in _do_run_calc
calc.pre_execute()
File "/usr/local/openquake/oq-engine/openquake/calculators/hazard/classical/core.py", line 228, in pre_execute
self.initialize_sources()
File "/usr/local/openquake/oq-engine/openquake/calculators/hazard/general.py", line 579, in initialize_sources
src_db_writer.serialize()
File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 217, in inner
res = func(*args, **kwargs)
File "/usr/local/openquake/oq-engine/openquake/input/source.py", line 419, in serialize
src, self.mesh_spacing, self.bin_width, self.area_src_disc
File "/usr/local/openquake/oq-engine/openquake/input/source.py", line 68, in nrml_to_nhlib
return _area_to_nhlib(src, mesh_spacing, bin_width, area_src_disc)
File "/usr/local/openquake/oq-engine/openquake/input/source.py", line 149, in _area_to_nhlib
[geo.Point(*x) for x in list(shapely_polygon.exterior.coords)[:-1]]
File "/usr/local/openquake/nhlib/nhlib/geo/polygon.py", line 57, in __init__
raise ValueError('polygon perimeter intersects itself')
ValueError: polygon perimeter intersects itself

** Affects: openquake
Importance: Undecided
Status: New

--
You received this bug notification because you are subscribed to
OpenQuake.
Matching subscriptions: openquake-bugs
https://bugs.launchpad.net/bugs/1101249

Title:
oq-engine: Display source information (id, name) if an error occurs
during source init

Status in OpenQuake:
New

Bug description:
When sources are parsed and loaded into the DB, if something goes
wrong, with the geometry for example, there is no information to
identify the source of the error.

Here is an example of error message you might see in this case:

Traceback (most recent call last):
File "bin/openquake", line 471, in <module>
main()
File "bin/openquake", line 450, in main
args.force_inputs, args.exports)
File "bin/openquake", line 221, in run_hazard
completed_job = engine2.run_hazard(job, log_level, log_file, exports)
File "/usr/local/openquake/oq-engine/openquake/engine2.py", line 326, in run_hazard
return _run_calc(job, log_level, log_file, exports, calc, 'hazard')
File "/usr/local/openquake/oq-engine/openquake/engine2.py", line 393, in _run_calc
_do_run_calc(job, exports, calc, job_type)
File "/usr/local/openquake/oq-engine/openquake/engine2.py", line 467, in _do_run_calc
calc.pre_execute()
File "/usr/local/openquake/oq-engine/openquake/calculators/hazard/classical/core.py", line 228, in pre_execute
self.initialize_sources()
File "/usr/local/openquake/oq-engine/openquake/calculators/hazard/general.py", line 579, in initialize_sources
src_db_writer.serialize()
File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 217, in inner
res = func(*args, **kwargs)
File "/usr/local/openquake/oq-engine/openquake/input/source.py", line 419, in serialize
src, self.mesh_spacing, self.bin_width, self.area_src_disc
File "/usr/local/openquake/oq-engine/openquake/input/source.py", line 68, in nrml_to_nhlib
return _area_to_nhlib(src, mesh_spacing, bin_width, area_src_disc)
File "/usr/local/openquake/oq-engine/openquake/input/source.py", line 149, in _area_to_nhlib
[geo.Point(*x) for x in list(shapely_polygon.exterior.coords)[:-1]]
File "/usr/local/openquake/nhlib/nhlib/geo/polygon.py", line 57, in __init__
raise ValueError('polygon perimeter intersects itself')
ValueError: polygon perimeter intersects itself

To manage notifications about this bug go to:
https://bugs.launchpad.net/openquake/+bug/1101249/+subscriptions
Reply all
Reply to author
Forward
0 new messages