Error exporting pro...
 
Notifications
Clear all

[Résolu] Error exporting project to inp file


(@teresa)
New Member
Inscription: Il y a 3 ans
Posts: 4
Topic starter  

Hello everyone,

I'm new to Giswater and I'm trying to export my project to a .inp file but I get this message:

Error type: <class 'IndexError'>

File name: controller.py

Line number: 1891

Traceback (most recent call last):

File "C:/Users/shc-user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\giswater\dao\controller.py", line 1891, in manage_exception_api

module_path = inspect.stack()[stack_level][1]

IndexError: list index out of range

 

I'm using Qgis 3.16.0 and Giswater 3.4.036.

 can't find what the function manage_exception_api is looking for. Any ideas? 🙁

 


Quote
(@xtorret)
Active Member
Inscription: Il y a 8 ans
Posts: 5
 

Hello @teresa

May be the process of exportation INP it crashes. Reason could be som inconsistency in the data.

First thing to do is to check database data using the the check project button (right button with Giswater icone on toolbar).   If you solve all ERRORS and WARNINGS may be you will fix your problem.

Otherwise, if problem reoccurs, could be because sometimes the exception is not well handled. In this case, you have two possible solutions:

1-To execute export process from PG console looking for error

2-To update version 3.5 your project. Maybe you will have same problem but maybe it will appear on the QGIS dialog.

To execute export process using PG console type:

`SELECT SCHEMA_NAME.gw_fct_pg2epa_main($${"data":{"RESULT_NAME":"test1"}}$$)` 

where SCHEMA_NAME is the name of your schema and RESULT_NAME is the name of your result (feel free to propose any name you want keeping 16 characters length as maximum and avoiding special characters

After that, I invite you to share the return with us again looking for the solution

I wish I had been useful


RépondreQuote
(@teresa)
New Member
Inscription: Il y a 3 ans
Posts: 4
Topic starter  

Hello @xtorret,

thank you for helping me. I fixed all my errors and warning but nothing changed. I tried executing the export process from PG console and I got this message: 

{"status":"Failed", "body":{"data":{"info":{"values":[{"message":"null value in column \"result_id\" violates not-null constraint"}]}}}, "NOSQLERR":"null value in column \"result_id\" violates not-null constraint","SQLSTATE":"23502","SQLCONTEXT":"SQL statement \"INSERT INTO rpt_cat_result (result_id, inpoptions) VALUES (v_result, v_inpoptions)\"\nPL/pgSQL function sdf_giavera.gw_fct_pg2epa_main(json) line 89 at SQL statement"}

I also tried to export the project created with the example data and it doesn't work either. 

So then I tried with giswater 3.5 and it works!

Thank you!

 

 

 


RépondreQuote
Share: