Artelia / Mascaret

Pre and Post Processing for Mascaret
GNU General Public License v3.0
3 stars 3 forks source link

Error when creating a new schema #30

Closed maximlt closed 3 years ago

maximlt commented 4 years ago

When I create a new schema (model) from the plugin (v 2.1.0), I get the following error message in debug mode:

Running Create Layers and Tables...

Model "test" created.
  laws OK
  events OK
  extremities OK
  topo OK
ProgrammingError('function calcul_abscisse_point() does not exist\n',)
Process aborted!
failure!

ProgrammingError('function calcul_abscisse_point() does not exist\n',)
Process aborted!
failure!

ProgrammingError('function calcul_abscisse_point() does not exist\n',)
Process aborted!
failure!

ProgrammingError('function calcul_abscisse_point() does not exist\n',)
Process aborted!
failure!

ProgrammingError('function calcul_abscisse_point() does not exist\n',)
Process aborted!
failure!

ProgrammingError('function calcul_abscisse_point() does not exist\n',)
Process aborted!
failure!

ProgrammingError('function calcul_abscisse_point() does not exist\n',)
Process aborted!
failure!

  basins OK
ProgrammingError('function calcul_abscisse_profil() does not exist\n',)
Process aborted!
failure!

ProgrammingError('function calcul_abscisse_profil() does not exist\n',)
Process aborted!
failure!

ProgrammingError('function calcul_abscisse_branche() does not exist\n',)
Process aborted!
failure!

  resultats OK
  resultats_basin OK
  resultats_links OK
  runs OK
  observations OK
  parametres OK
  laws_wq OK
  tracer_physic OK
  tracer_name OK
  tracer_config OK
  meteo_config OK
  laws_meteo OK
  init_conc_config OK
  init_conc_wq OK
 View laws : OK
 View events : OK
 View extremities : OK
 View topo : OK
 View basins : OK
Model "test" completed

It's the first time I use this plugin. I assume all the tables are not created. image

daoum commented 4 years ago

Hello,

This bug is fixed in the next version which comes out very soon (this week) If you want not wait, you could get the new version with following link: https://github.com/Artelia/Mascaret/archive/dev_API_mascaret.zip

maximlt commented 4 years ago

OK thanks, I will try to find some time to try that new version before you get the release out.

maximlt commented 4 years ago

I've uninstalled my previous version of the plugin from QGIS and installed the zipped version. Unfortunately I still have the same error:

Running Create Layers and Tables...

Model "test_mascaret2" created.
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_branche() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_profil() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_point() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_point() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_point() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_point() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_point() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_point() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_point() n'existe pas\n")
Process aborted!
UndefinedFunction("ERREUR:  la fonction calcul_abscisse_profil() n'existe pas\n")
Process aborted!
Model "test_mascaret2" completed

My setup: Windows 10 + QGIS 3.14.15 + Mascaret 3.0.4

Also note that I have never used the plugin before so I have no cached or temporary files that could interact with that new version of the plugin.

daoum commented 4 years ago

I am not reproducing the error.

Did you follow the different steps ?

  1. Creation of a database in postgres
  2. Connect this database in qgis
  3. Finally, select this database and create a model in the plugin.

If it's not the problem, the version of postgres could perhapse explain. Do you have install postgis ? What version of postgres are you using?

maximlt commented 4 years ago

Yes I have followed these steps. I also tried to create a new schema and its tables in RiverGis, it works fine there.

I have PostgresSQL 10.14 and PostGIS 2.4.3 (that's on my Ubuntu 18.04 OS, I'm switching between this one and Windows 10).

MathieuBottero commented 4 years ago

Hello,

I have the same problem with QGIS 2.18.28, PostgreSQL 9.4, Mascaret 0.1.13 on Windows 10. But I can open and use an imported model created on another setup and it works fine.

I tried to install Mascaret 2.1 and 3.0.4 with QGIS 3.10.9 and I got the same error message.

daoum commented 4 years ago

Hello,

The error could be due to adding the postgis extention to the database. After creating a new database, did you create a first model before making any changes to the database (like a import)? Because after creating the database, creating the first model allows you to add the Postgis extension to the database as well as the functions that you seem to be missing. Do you have reproduce the error or a new?

If t you have always, I don't have a solution yet. For now, you can still use the following configuration:

it should be working (this is the one I use mainly).

maximlt commented 4 years ago

Thanks @daoum that was the trick, not to do anything after the database was created.

Before that I activated PotsGIS manually as described in the docs of RiverGIS. Apparently your plugin works in a different way and that messed up setting the data base.

For any one else who might encounter this issue: just create a new data base (I used pgAdmin for that) and then create a new model from the plugin. I've managed to do that with PostGIS 2.5.3, PostgreSQL 9.6 on Windows 10.

I guess you should close this issue after this is documented somewhere :)