qgis-swmm icon indicating copy to clipboard operation
qgis-swmm copied to clipboard

Error after running the simulation

Open knraj opened this issue 6 years ago • 9 comments

Hi Vincent,

I have run the simulation. But the processing did not happen as there were errors written to the swmm.out log file which are as follows: AS per your suggestion am posting the error into the github as an open issue ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 113 of [TIMESERIES] section: INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 0) 0.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 114 of [TIMESERIES] section: INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 15) 40.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 115 of [TIMESERIES] section: INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 0) 40.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 116 of [TIMESERIES] section: INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 15) 0.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 117 of [TIMESERIES] section: INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 12, 0) 0.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 118 of [TIMESERIES] section: INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 0) 0.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 119 of [TIMESERIES] section: INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 15) 45.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 120 of [TIMESERIES] section: INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 0) 45.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 121 of [TIMESERIES] section: INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 15) 0.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 122 of [TIMESERIES] section: INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 12, 0) 0.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 123 of [TIMESERIES] section: INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 0) 0.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 124 of [TIMESERIES] section: INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 15) 50.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 125 of [TIMESERIES] section: INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 0) 50.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 126 of [TIMESERIES] section: INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 15) 0.0

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 127 of [TIMESERIES] section: INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 12, 0) 0.0

Please kind guide me as to how to resolve the above issue. Would be highly grateful to you as I want to complete the end to end processing.

knraj avatar Sep 04 '18 07:09 knraj

Can you look at the .inp file that has been generated at the [TIMESERIES] section. There is apparently a problem there.

vmora avatar Sep 04 '18 07:09 vmora

I have opened the swmm.imp file. By default the following error file with the following errors got displayed: Also in the QGIS Processing section the following errors were displayed: Uncaught error while executing algorithm Traceback (most recent call last): File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 203, in execute self.processAlgorithm(progress) File "C:/Users/NAGARAJU/.qgis2/python/plugins\qgis-swmm\SwmmAlgorithm.py", line 324, in processAlgorithm raise RuntimeError('There were errors, look into logs for details') RuntimeError: There were errors, look into logs for details

The swmm.inp error file details:

Error Report for File C:\Users\NAGARAJU.qgis2\processing\outputs\swmm.inp

Error 201 at line 5: [OPTIONS] FLOW_UNITS CFS

Error 201 at line 6: [OPTIONS] INFILTRATION HORTON

Error 201 at line 7: [OPTIONS] FLOW_ROUTING DYNWAVE

Error 201 at line 8: [OPTIONS] START_DATE 01/01/1988

Error 201 at line 9: [OPTIONS] START_TIME 00:00:00

Error 201 at line 10: [OPTIONS] REPORT_START_DATE 01/01/1988

Error 201 at line 11: [OPTIONS] REPORT_START_TIME 00:00:00

Error 201 at line 12: [OPTIONS] END_DATE 01/01/1988

Error 201 at line 13: [OPTIONS] END_TIME 08:00:00

Error 201 at line 14: [OPTIONS] SWEEP_START 01/01

Error 201 at line 15: [OPTIONS] SWEEP_END 12/31

45 more errors found in file.

knraj avatar Sep 04 '18 08:09 knraj

There is a dateformat incompatibility between Postgres database (where the dateformat appears correct) and the table loaded within QGIS. Now while running the simulation, I deselect timeseries, I get the following error:

Uncaught error while executing algorithm Traceback (most recent call last): File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 203, in execute self.processAlgorithm(progress) File "C:/Users/NAGARAJU/.qgis2/python/plugins\qgis-swmm\SwmmAlgorithm.py", line 396, in processAlgorithm feature['Time'] = convert_date(tbl[0])+' '+tbl[1] File "C:/Users/NAGARAJU/.qgis2/python/plugins\qgis-swmm\SwmmAlgorithm.py", line 66, in convert_date if not m : raise RuntimeError RuntimeError

knraj avatar Sep 04 '18 08:09 knraj

What do you mean by "deselect timeseries" ?

vmora avatar Sep 04 '18 09:09 vmora

I have not selected the timeseries object as part of the simulation run.

knraj avatar Sep 04 '18 10:09 knraj

I think it's mandatory because the case without timeseries is not handled.

vmora avatar Sep 04 '18 10:09 vmora

If I select the timeseries the date format within QGIS is incompatible with the following format: YYYY-mm-dd HH:mm:ss. The timeseries table within QGIS has a different datetime format which I think the python program is not able to convert as it is not in the standard format.

knraj avatar Sep 04 '18 10:09 knraj

Can't it be converted to the proper format ?

vmora avatar Sep 04 '18 11:09 vmora

Hi Vincent,

I am unable to change the format in the QGIS Object Attribute table. It is not allowing me to edit the value of the datetime field while in Postgres SQL DB from where the tables have been imported into QGIS, the datetime field in Postgres SQL DB, the datetime format is in proper.

Please kindly advise as to how to proceed further.

Thanks and Regards, KN Rao

On Tue, Sep 4, 2018 at 5:29 PM Vincent Mora [email protected] wrote:

Can't it be converted to the proper format ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Oslandia/qgis-swmm/issues/17#issuecomment-418340567, or mute the thread https://github.com/notifications/unsubscribe-auth/AmGTC1SuicBn-IfcsNZopOfXeEGE6Jr5ks5uXmsegaJpZM4WYduZ .

knraj avatar Sep 06 '18 12:09 knraj