Découvrez et testez Noethysweb, la version fullweb

Plus d'informations
il y a 2 ans 3 semaines #25881 par Ivan
Bonjour,

La version 1.3.0.7. de Noethys propose désormais la fonction "Exporter vers Noethysweb" depuis le menu Fichier.

Le README du github de Noethysweb a été actualisé afin de présenter la procédure d'importation d'un fichier Noethys :  https://github.com/Noethys/Noethysweb
​​​
Merci de signaler les éventuels bugs rencontrés.

Ivan
Les utilisateur(s) suivant ont remercié: empp

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines #25884 par empp
Bonjour Yvan,
Merci pour cette option très attendue pour moi.
J'ai donc refait l'installation avec la base exportée sans problème particulier, mais je bloque au niveau final, c'est à dire lorsque je me connecte via les urls utilisateur, admin ou même le portail.
Problème : You're accessing the development server over HTTPS, but it only supports HTTP
Je suis sous windows 11, navigateurs testés : Edge, Opera, Brave
Une piste ?
Bernard

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines #25886 par guerdal
Bonjour Yvan
Donc nouvelle installation de NoethysWeb pour repartir au propre :-)
Export de notre base avec la version Noethys 1.3.0.7 : ça a l'air ok
Initialisation de NoethysWeb
  • python3 manage.py makemigrations => OK
  • python3 manage.py migrate => OK
  • python3 manage.py collectstatic => OK
  • python3 manage.py createsuperuser => OK
  • python3 manage.py update_permissions => OK
  • python3 manage.py import_fichier /home/davidallard/Téléchargements/Noethysweb_20220328_0819.nweb ******* => KO
    • python3 manage.py import_fichier /home/davidallard/Téléchargements/Noethysweb_20220328_0819.nweb 123456
      Loading '/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/media/temp/restauration/core' fixtures...
      Checking '/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/media/temp/restauration' for fixtures...
      Installing json fixture 'core' from '/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/media/temp/restauration'.
      Processed 93 object(s).Traceback (most recent call last):
        File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 84, in _execute
          return self.cursor.execute(sql, params)
        File "/usr/local/lib/python3.8/dist-packages/django/db/backends/sqlite3/base.py", line 423, in execute
          return Database.Cursor.execute(self, query, params)
      sqlite3.IntegrityError: NOT NULL constraint failed: organisateur.fax

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/outils/utils/utils_sauvegarde.py", line 63, in Restauration
          resultat = Load_fixtures(nom_fichier=os.path.join(rep_destination, "core.json"))
        File "/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/outils/utils/utils_sauvegarde.py", line 96, in Load_fixtures
          call_command('loaddata', nom_fichier, **{
        File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 181, in call_command
          return command.execute(*args, **defaults)
        File "/usr/local/lib/python3.8/dist-packages/django/core/management/base.py", line 398, in execute
          output = self.handle(*args, **options)
        File "/usr/local/lib/python3.8/dist-packages/django/core/management/commands/loaddata.py", line 78, in handle
          self.loaddata(fixture_labels)
        File "/usr/local/lib/python3.8/dist-packages/django/core/management/commands/loaddata.py", line 123, in loaddata
          self.load_label(fixture_label)
        File "/usr/local/lib/python3.8/dist-packages/django/core/management/commands/loaddata.py", line 190, in load_label
          obj.save(using=self.using)
        File "/usr/local/lib/python3.8/dist-packages/django/core/serializers/base.py", line 223, in save
          models.Model.save_base(self.object, using=using, raw=True, **kwargs)
        File "/usr/local/lib/python3.8/dist-packages/django/db/models/base.py", line 776, in save_base
          updated = self._save_table(
        File "/usr/local/lib/python3.8/dist-packages/django/db/models/base.py", line 881, in _save_table
          results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
        File "/usr/local/lib/python3.8/dist-packages/django/db/models/base.py", line 919, in _do_insert
          return manager._insert(
        File "/usr/local/lib/python3.8/dist-packages/django/db/models/manager.py", line 85, in manager_method
          return getattr(self.get_queryset(), name)(*args, **kwargs)
        File "/usr/local/lib/python3.8/dist-packages/django/db/models/query.py", line 1270, in _insert
          return query.get_compiler(using=using).execute_sql(returning_fields)
        File "/usr/local/lib/python3.8/dist-packages/django/db/models/sql/compiler.py", line 1416, in execute_sql
          cursor.execute(sql, params)
        File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 66, in execute
          return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
        File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
          return executor(sql, params, many, context)
        File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 84, in _execute
          return self.cursor.execute(sql, params)
        File "/usr/local/lib/python3.8/dist-packages/django/db/utils.py", line 90, in __exit__
          raise dj_exc_value.with_traceback(traceback) from exc_value
        File "/usr/local/lib/python3.8/dist-packages/django/db/backends/utils.py", line 84, in _execute
          return self.cursor.execute(sql, params)
        File "/usr/local/lib/python3.8/dist-packages/django/db/backends/sqlite3/base.py", line 423, in execute
          return Database.Cursor.execute(self, query, params)
      django.db.utils.IntegrityError: Problem installing fixture '/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/media/temp/restauration/core.json': Could not load core.Organisateur(pk=1): NOT NULL constraint failed: organisateur.fax
      None
      resultat= Une erreur est survenue durant la restauration: Problem installing fixture '/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/media/temp/restauration/core.json': Could not load core.Organisateur(pk=1): NOT NULL constraint failed: organisateur.fax.
Donc pour l'instant je ne peux pas aller plus loin

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines #25887 par Ivan
Bonjour,

Oui, je vois d'où vient l'erreur. En attendant un correctif, voilà comment contourner le bug maintenant : Aller dans Menu Paramétrage > Organisateur : Saisir un numéro de fax, un mail, un site, un numéro d'agrément, un code APE et un SIRET fictifs. Bref, éviter que ces champs soient vides. Après l'import, il suffira de les supprimer dans Noethysweb.

Ivan

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines #25888 par Ivan
En réponse à EMPP :

En test, il faut aller dans noethysweb/settings_production.py pour désactiver toutes les lignes qui suivent la ligne :# Sécurité

(Mettre un # devant les lignes")

Ivan

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines #25889 par guerdal
Effectivement c'est mieux ça lance l'import.
Mais j'ai une nouvelle erreur :
python3 manage.py import_fichier /home/davidallard/Téléchargements/Noethysweb_20220328_0941.nweb ******
Loading '/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/media/temp/restauration/core' fixtures...
Checking '/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/media/temp/restauration' for fixtures...
Installing json fixture 'core' from '/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/media/temp/restauration'.
Processed 70442 object(s).
Traceback (most recent call last):
  File "/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/outils/utils/utils_sauvegarde.py", line 63, in Restauration
    resultat = Load_fixtures(nom_fichier=os.path.join(rep_destination, "core.json"))
  File "/home/davidallard/Documents/Logiciels/noethys-web/Noethysweb/noethysweb/outils/utils/utils_sauvegarde.py", line 96, in Load_fixtures
    call_command('loaddata', nom_fichier, **{
  File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 181, in call_command
    return command.execute(*args, **defaults)
  File "/usr/local/lib/python3.8/dist-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/dist-packages/django/core/management/commands/loaddata.py", line 78, in handle
    self.loaddata(fixture_labels)
  File "/usr/local/lib/python3.8/dist-packages/django/core/management/commands/loaddata.py", line 131, in loaddata
    connection.check_constraints(table_names=table_names)
  File "/usr/local/lib/python3.8/dist-packages/django/db/backends/sqlite3/base.py", line 353, in check_constraints
    raise IntegrityError(
django.db.utils.IntegrityError: Problem installing fixtures: The row in table 'pieces' with primary key '369' has an invalid foreign key: pieces.individu_id contains a value '1850' that does not have a corresponding value in individus.IDindividu.
None
resultat= Une erreur est survenue durant la restauration: Problem installing fixtures: The row in table 'pieces' with primary key '369' has an invalid foreign key: pieces.individu_id contains a value '1850' that does not have a corresponding value in individus.IDindividu..

Si vous avez une idée :-)

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines - il y a 2 ans 3 semaines #25890 par guerdal
Je pense avoir trouvé
En regardant la BDD d'origine, j'ai un trou de deux individus (id:1849 et id:1850) va falloir que je ppose la question à mes collègues pour la raison
Donc forcément dans la table pièce, ça génère une erreur

Question idiote : à quoi sert cette table pour que je trouve où mes collègues ont fait une erreur ?

Question moins idiote : si je supprime la pièce en erreur, est-ce que cela a un impact sur Noethys ?
Au pire, je fais un backup ce soir et je teste :-p
Dernière édition: il y a 2 ans 3 semaines par guerdal.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines #25891 par empp
Bonjour à Tous,
J'ai refait une installation complète à partir de la version de ce matin. J'ai une erreur à l'import de la base :
  File "C:\Users\berna\AppData\Roaming\Python\Python310\site-packages\django\db\backends\sqlite3\base.py", line 353, in check_constraints
    raise IntegrityError(
django.db.utils.IntegrityError: Problem installing fixtures: The row in table 'evenements' with primary key '1' has an invalid foreign key: evenements.unite_id contains a value '1' that does not have a corresponding value in unites.IDunite.
None
resultat= Une erreur est survenue durant la restauration: Problem installing fixtures: The row in table 'evenements' with primary key '1' has an invalid foreign key: evenements.unite_id contains a value '1' that does not have a corresponding value in unites.IDunite..


Bernard

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines #25892 par Ivan
Guerdal : Le plus simple est de supprimer les pièces qui posent problème. Aucune incidence.

1. Faire une sauvegarde de la base puis :
2. Menu Outils > Utilitaires admin > Procédures
3. Saisir le numéro A5000 et faire Entrée,
4. Taper la requête DELETE FROM pieces WHERE IDindividu IN (1849, 1850) et faire Entrée.
 

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 semaines #25893 par Ivan
EMPP : Le problème vient des événements.

Est-ce que les événements sont payants ou gratuits ?

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.204 secondes
Propulsé par Kunena