Welcome, Guest
Username: Password: Remember me

TOPIC: Export modèle

Export modèle 6 months 6 days ago #44730

Bonjour,

Nous essayons d'exporter notre modèle (enregistré en local) depuis quelques temps.
Cependant en utilisant le bouton "export model" du plugin Mascaret on obtient le message d'erreur suivant :

UndefinedFunction("ERREUR: la fonction clone_schema(unknown, unknown, unknown) n'existe pas\nLINE 1: SELECT clone_schema('aa','aa_ext202405151109','runs,results_...\n ^\nHINT: Aucune fonction ne correspond au nom donné et aux types d'arguments.\nVous devez ajouter des conversions explicites de type.\n")
InvalidSchemaName("ERREUR: le schéma « aa_ext202405151109 » n'existe pas\n")



Et le fichier psql est vide (O Ko)

Seriez-vous ce que signifie le message et comment régler le problème ?

Nous utilisons la version 3.28.15 de QGIS et la version 5.1.9 de Mascaret

Merci d'avance

Charlotte Raynal et la team Mascaret SPC BN
The administrator has disabled public write access.

Export modèle 6 months 6 days ago #44732

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Charlotte,

Please read the rules of this forum, in particular please write in English (rule #6) as everybody cannot read French. You may get more answers to your questions.

And please do not use this strange sub-category "en francais".

Unfortunately, I cannot help you as I am not a MASCARET user, nor a MASCARET developer.

Chi-Tuan
The administrator has disabled public write access.

Export modèle 6 months 6 days ago #44736

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi Chi-Tuan,

The sub-category "en français" has been created with sebastien's agrement for Vigicrue modelers (some members of this community are a bit shy in English)... This is why Charlotte posted it in that sub-category... but I don't understand why this post is not in that "private" sub-category.

I know it would be better is vigicrue members could post in english on category Mascaret (in that case the best category is "QGIS for the open TELEMAC system")... but step by step.

First step is to bring back discussions dealing with the plugin or mascaret (usually by email) on the forum.

Anyway, Charlotte's issue might be a bug fixed in latest dev version 5.1.11

Alexis
The administrator has disabled public write access.
The following user(s) said Thank You: Charlotte

Export modèle 6 months 6 days ago #44742

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Alexis,

Thanks for your explanation, I was not aware of this decision. The problem is that I am one of the moderators of this forum and if nobody tells me, hard to know. As Charlotte posted her 1st message, it had to be approved by a moderator first so that it can be read by everybody (and the following ones). That is why I moved the 2 posts from this "en francais" sub-category to the standard one as that surprised me (it may enable you to understand the process). I will do it slower in the future or wait for another moderator to do the job.

Anyway, I can understand people are not keen on writing in English, but with AI and translators, it is not so difficult to write in English nowadays (this is my own opinion). The problem is that this issue may also be interesting for other users who cannot read another language.

Best regards,

Chi-Tuan
The administrator has disabled public write access.

Export modèle 6 months 6 days ago #44748

  • Oceane
  • Oceane's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hello,

It is also my first message on the forum.

After your answer, I upgraded Mascaret and the model Aa to version 1.11.

I couldn't copy the model and the export didn't work (log in attached file 2024-05-15_pbexport.jpg).

Then I tried with the pgadmin method (pgadmin 4 v6). I can copy the schema, but when I import it, it fails but some files seems to have been copied. And then, when I try to import in Mascaret, I have an error : function find_srif doesn't exist (log in attached file 2024-05-15_erreur_lecture_schema_copie_pgadmin.jpg).

Thanks in advance

Best regards,
Océane Antoine
SPC Bassins du Nord
Attachments:
The administrator has disabled public write access.

Export modèle 6 months 6 days ago #44749

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi Oceane,

I'm not import/export specialist.
Anyway, did you fill your psql path in Help - Settings - Options ?
What is yur Qgis version?
Do you have pg_restore, pg_dump, psql in C:\Program Files\QGIS 3.xx\bin?

Alexis
The administrator has disabled public write access.

Export modèle 5 months 3 weeks ago #44803

  • Oceane
  • Oceane's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hello Alexis,

The psql path wasn't filled but the problem still persists with the path filled.
We are working with Qgis 3.28.
We have the files you mentionned in C:\Program Files\QGIS 3.xx\bin

Océane
The administrator has disabled public write access.

Export modèle 5 months 3 weeks ago #44804

Hi Alexis,
our QGIS version is 3.28,
in Mascaret the psql path is filled

We have pg_restore.exe, pg_dump.exe, psql.exe in C:\Program Files\PostgreSQL\13\bin.

We still have errors when we try to export the model. Cf images


Charlotte Raynal and the Mascaret's team SPC BN
Attachments:
The administrator has disabled public write access.

Export modèle 5 months 3 weeks ago #44843

  • abernard
  • abernard's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 210
  • Thank you received: 45
Hi Oceane and Charlotte,

Hard to say as the process works well on my computer.

Anyway, a good practice when having troubles with upgrade or import/export is to create a new base.

It's not easy to work with different version of the plugin and also a good practice is to have one base per version of the plugin or at least one base for the official version of the plugin and another for the experimental version.

At the moment, there are many differences between official and experimental... differences not only in the plugin but also in schema (model) tables... without backwards-compatibility.

Aexis

Backup and restore from pgadmin or terminal should be more robust and in some cases

Alexis
The administrator has disabled public write access.

Export modèle 5 months 3 weeks ago #44846

Hi,

To avoid future issues, the previous advice is perfect.

The error is that it cannot find the "schema_clone" function in the database. It should be located in the functions of the public schema. To correct this:

- You can start over with a new database.
- It would be possible to test the creation of a new empty model which should check if the schema_clone function exists and create it if necessary.
- Or try to recover the function from another database to integrate it into the public schema of the problematic database.
Best regards,
The administrator has disabled public write access.
Moderators: JFourdrinoy

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.