import inp file debug mode - Giswater/giswater_dbmodel GitHub Wiki

The import inp file is on dev mode.

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

1.Fix data source:

  1. Check diferences between section which crashes according the error [PUMPS/CONDUITS/JUNCTIONS...] of your inp file and same section [PUMPS/CONDUITS/JUNCTIONS...] from the example inp file plugins\giswater\resources\example\inp\swmm\swmm.inp.
  2. Try to rewrite your inp file crashed section [PUMPS/CONDUITS/JUNCTIONS...] according the section defined on the 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 which data produces the error. Trace and fix it. Maybe some INSERT need to be modified or some IF need to be created. We will be glad to provide assistance to fix this issue. Please contact with [email protected].

⚠️ **GitHub.com Fallback** ⚠️