Skip to content

import inp file debug mode

Xavier Torret edited this page Nov 25, 2021 · 11 revisions

The import inp file is on dev mode.

As result, if it crashes there are two ways to manage it:

1.Fix data source:

please check the diferences againts the sections [PUMPS] of your inp file and sections [PUMPS] from example inp file plugins\giswater\resources\example\inp\swmm\swmm.inp . Try to rewrite your [PUMPS] section according the section from example inp file wich it works!!!

2.Fix code:

  1. Set the variable import_inp_debug_mode on true (init.conf) and re-start QGIS
  2. Work with inp file as usual
  3. When process have been finished data from inp file will be stored on temp_csv table, ready to move from this table to target tables.
  4. Due lots of combinations of source data, maybe this process (moving data from temp_csv table to target tables) may crash, commonly because there is some exception on data not managed by Giswater yet wich breaks the process. To solve it, you can open the PostreSQL console and type:

UD PROJECTS: SELECT SCHEMA_NAME.gw_fct_import_swmm_inp($${"data":{"parameters":{"createSubcGeom":false}}}$$)

WS PROJECTS: SELECT SCHEMA_NAME.gw_fct_import_epanet_inp($${}}}$$)

On PostgreSQL you will receive information about what data it crashes. Trace and fix it. Maybe some INSERT need to be modified or some IF need to be created. WWe will glad to provide assistance to fix this issue. Please contact with [email protected].

Clone this wiki locally