Importation d'un fichier CSV

Plus d'informations
il y a 3 ans 4 mois #24401 par chcol
Bug avec wxPython 4.1.0 gtk3 a été créé par chcol
Bonjour,
Nous sommes une structure de séjours enfants, nous avons découvert ce logiciel en effectuant des recherches sur internet, malheureusement après l'installation sur un pc portable Ubuntu 20.04, je suis bloqué par la bug suivant:

## 26/11/2020 14:47:47 | 1.2.8.3 | wxPython 4.1.0 gtk3 (phoenix) wxWidgets 3.1.4 | linux Linux 5.4.0-54-generic x86_64 ##
Traceback (most recent call last):
  File "/home/christian/.local/lib/python3.8/site-packages/wx/lib/mixins/gridlabelrenderer.py", line 123, in _onPaintColLabels
    cols = self.CalcColLabelsExposed(window.GetUpdateRegion())
wx._core.wxAssertionError: C++ assertion "idx >= 0 && idx < m_numCols" failed at /home/wxpy/wxPython-4.1.0/ext/wxWidgets/include/wx/generic/grid.h(1843) in GetColPos(): invalid column index

Merci de bien vouloir m'aider pour le résoudre.
Christian

This browser does not support PDFs. Please download the PDF to view it: Download PDF

Pièces jointes :

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

Plus d'informations
il y a 3 ans 4 mois #24402 par Ivan
Réponse de Ivan sur le sujet Bug avec wxPython 4.1.0 gtk3
Bonjour,

Il s'agit d'un bug wxPython que j'ai signalé il y a quelques jours à son auteur et qu'il a corrigé aussitôt. Il faut utiliser la version 4.1.1. que l'on peut trouver ici parmi les snapshots-builds :  https://wxpython.org/Phoenix/snapshot-builds/ 

Attention, il peut subsister d'autres bugs avec les dernières version de wxPython, je suis en cours de débogage. Mais c'est à tester...

Ivan

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

Plus d'informations
il y a 3 ans 4 mois #24403 par Ivan
Réponse de Ivan sur le sujet Bug avec wxPython 4.1.0 gtk3
Non, je viens de dire une grosse ânerie. Je me suis mélangé les pinceaux, il s'agissait d'un autre bug.

Ce bug, j'ai dû le corriger manuellement dans wxPython : Fichier wx\lib\mixins\gridlabelrenderer.py

Il faut modifier cette fonction comme ceci :
def _onPaintColLabels(self, evt):
    window = evt.GetEventObject()
    dc = wx.PaintDC(window)

    try:
        cols = self.CalcColLabelsExposed(window.GetUpdateRegion())
    except:
        return
    if cols == [-1]:
        return
Ivan

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

Plus d'informations
il y a 3 ans 4 mois #24404 par chcol
Réponse de chcol sur le sujet Bug avec wxPython 4.1.0 gtk3
Bonsoir,
Merci pour votre réponse rapide ainsi que votre aide.
J'ai effectué la modification, maintenant lorsque je relance Noethys, il me donne les erreurs suivantes:
christian@christian-N2x0WU:~/Noethys-master/noethys$ python3 Noethys.py
Traceback (most recent call last):
  File "Noethys.py", line 57, in <module>
    from Dlg import DLG_Effectifs
  File "/home/christian/Noethys-master/noethys/Dlg/DLG_Effectifs.py", line 19, in <module>
    from Dlg import DLG_Remplissage
  File "/home/christian/Noethys-master/noethys/Dlg/DLG_Remplissage.py", line 19, in <module>
    from Ctrl import CTRL_Remplissage
  File "/home/christian/Noethys-master/noethys/Ctrl/CTRL_Remplissage.py", line 26, in <module>
    import wx.lib.mixins.gridlabelrenderer as glr
  File "/home/christian/.local/lib/python3.8/site-packages/wx/lib/mixins/gridlabelrenderer.py", line 126
    execpt:
    ^
SyntaxError: invalid syntax
Est ce que je dois installer la version wxPython 4.1.1 ?

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

Plus d'informations
il y a 3 ans 4 mois #24405 par chcol
Réponse de chcol sur le sujet Bug avec wxPython 4.1.0 gtk3
J'ai installé la version 4.1.1, j'ai le même type d'erreur voir ci-dessous:

christian@christian-N2x0WU:~/Noethys-master/noethys$ python3 Noethys.py
Traceback (most recent call last):
  File "Noethys.py", line 57, in <module>
    from Dlg import DLG_Effectifs
  File "/home/christian/Noethys-master/noethys/Dlg/DLG_Effectifs.py", line 19, in <module>
    from Dlg import DLG_Remplissage
  File "/home/christian/Noethys-master/noethys/Dlg/DLG_Remplissage.py", line 19, in <module>
    from Ctrl import CTRL_Remplissage
  File "/home/christian/Noethys-master/noethys/Ctrl/CTRL_Remplissage.py", line 26, in <module>
    import wx.lib.mixins.gridlabelrenderer as glr
  File "/home/christian/.local/lib/python3.8/site-packages/wx/lib/mixins/gridlabelrenderer.py", line 125
    cols = self.CalcColLabelsExposed(window.GetUpdateRegion())
    ^
IndentationError: expected an indented block
Merci pour votre aide.

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

Plus d'informations
il y a 3 ans 4 mois #24406 par Ivan
Réponse de Ivan sur le sujet Bug avec wxPython 4.1.0 gtk3
Bonjour,

La 4.1.1 comporte encore ce bug. Vous devez y faire la petite modification indiquée ci-dessus.
Quand vous avez essayé, elle n'a pas fonctionné car vous avez fait une faute de frappe dans "except".

Ivan

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

Plus d'informations
il y a 3 ans 4 mois #24407 par chcol
Réponse de chcol sur le sujet Bug avec wxPython 4.1.0 gtk3
Bonsoir,
J'ai corrigé et installé la version 4.1.1, cela fonctionne.
Merci pour votre aide, je vais continué à parcourir le programme et commencer à l'adapter pour mon centre de vacances.
Le cas échéant je reviendrai vers vous pour de l'aide.
Meilleures salutations
Christian

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

Plus d'informations
il y a 3 ans 4 mois #24409 par chcol
Réponse de chcol sur le sujet Bug avec wxPython 4.1.0 gtk3
Bonjour Ivan,
J'ai voulu charger une activté (exemplede séjour) sur Noethys, ci-dessous voici le message d'erreur qui m'est retourné:

## 30/11/2020 10:55:59 | 1.2.8.3 | wxPython 4.1.1 gtk3 (phoenix) wxWidgets 3.1.5 | linux Linux 5.4.0-54-generic x86_64 ##
Traceback (most recent call last):
  File "/home/christian/noethys/Dlg/DLG_Activites.py", line 143, in Ajouter
    self.ctrl_listview.Ajouter(None)
  File "/home/christian/noethys/Ol/OL_Activites.py", line 363, in Ajouter
    dlg = module.Dialog(self)
  File "/home/christian/noethys/Ctrl/CTRL_Assistant_sejour.py", line 284, in __init__
    Assistant.Dialog.__init__(self, parent, page_introduction=Page_introduction)
  File "/home/christian/noethys/Ctrl/CTRL_Assistant_base.py", line 549, in __init__
    self.page_active = page_introduction(self)
  File "/home/christian/noethys/Ctrl/CTRL_Assistant_sejour.py", line 30, in __init__
    self.Ajouter_question(titre=_(u"Bienvenue dans l'assistant de génération d'une activité de type séjour (camps, mini-camps, colos, etc...)"))
  File "/home/christian/noethys/Ctrl/CTRL_Assistant_base.py", line 385, in Ajouter_question
    self.sizer.Add(ctrl_titre, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_CENTRE_VERTICAL)" failed at /home/wxpy/wxPython-4.1.1/ext/wxWidgets/src/common/sizer.cpp(2143) in DoInsert(): Vertical alignment flags are ignored in vertical sizers

Rapport :

## 30/11/2020 10:55:59 | 1.2.8.3 | wxPython 4.1.1 gtk3 (phoenix) wxWidgets 3.1.5 | linux Linux 5.4.0-54-generic x86_64 ##
Traceback (most recent call last):
  File "/home/christian/noethys/Dlg/DLG_Activites.py", line 143, in Ajouter
    self.ctrl_listview.Ajouter(None)
  File "/home/christian/noethys/Ol/OL_Activites.py", line 363, in Ajouter
    dlg = module.Dialog(self)
  File "/home/christian/noethys/Ctrl/CTRL_Assistant_sejour.py", line 284, in __init__
    Assistant.Dialog.__init__(self, parent, page_introduction=Page_introduction)
  File "/home/christian/noethys/Ctrl/CTRL_Assistant_base.py", line 549, in __init__
    self.page_active = page_introduction(self)
  File "/home/christian/noethys/Ctrl/CTRL_Assistant_sejour.py", line 30, in __init__
    self.Ajouter_question(titre=_(u"Bienvenue dans l'assistant de génération d'une activité de type séjour (camps, mini-camps, colos, etc...)"))
  File "/home/christian/noethys/Ctrl/CTRL_Assistant_base.py", line 385, in Ajouter_question
    self.sizer.Add(ctrl_titre, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 5)
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_CENTRE_VERTICAL)" failed at /home/wxpy/wxPython-4.1.1/ext/wxWidgets/src/common/sizer.cpp(2143) in DoInsert(): Vertical alignment flags are ignored in vertical sizers

Commentaires :

Aucun

Merci de bien vouloir m'aider.
A noter que j'ai essayé avec d'autre exemple, le résultat est identique.
Bien cordialement
Christian

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

Plus d'informations
il y a 3 ans 4 mois #24410 par chcol
Réponse de chcol sur le sujet Bug avec wxPython 4.1.0 gtk3
Re-Bonjour Ivan,

Voici un nouveau message d'erreur lors de l'importation d'un fichier .nxa

## 30/11/2020 11:12:30 | 1.2.8.3 | wxPython 4.1.1 gtk3 (phoenix) wxWidgets 3.1.5 | linux Linux 5.4.0-54-generic x86_64 ##
Traceback (most recent call last):
  File "/home/christian/noethys/Ol/OL_Activites.py", line 451, in Importer
    importation = UTILS_Export_tables.Importer(fichier=nomFichierLong)
  File "/home/christian/noethys/Utils/UTILS_Export_tables.py", line 166, in __init__
    dictInfos = InfosFichier(self.fichier)
  File "/home/christian/noethys/Utils/UTILS_Export_tables.py", line 29, in InfosFichier
    data = UTILS_Json.Lire(fichier)
  File "/home/christian/noethys/Utils/UTILS_Json.py", line 96, in Lire
    data = json.load(json_file, object_hook=MyDecoder)
  File "/usr/lib/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xde in position 58: invalid continuation byte

Rapport :

## 30/11/2020 11:12:30 | 1.2.8.3 | wxPython 4.1.1 gtk3 (phoenix) wxWidgets 3.1.5 | linux Linux 5.4.0-54-generic x86_64 ##
Traceback (most recent call last):
  File "/home/christian/noethys/Ol/OL_Activites.py", line 451, in Importer
    importation = UTILS_Export_tables.Importer(fichier=nomFichierLong)
  File "/home/christian/noethys/Utils/UTILS_Export_tables.py", line 166, in __init__
    dictInfos = InfosFichier(self.fichier)
  File "/home/christian/noethys/Utils/UTILS_Export_tables.py", line 29, in InfosFichier
    data = UTILS_Json.Lire(fichier)
  File "/home/christian/noethys/Utils/UTILS_Json.py", line 96, in Lire
    data = json.load(json_file, object_hook=MyDecoder)
  File "/usr/lib/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xde in position 58: invalid continuation byte

Merci pour votre aide.
Cordialement

Christian

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

Plus d'informations
il y a 3 ans 4 mois #24411 par Ivan
Réponse de Ivan sur le sujet Bug avec wxPython 4.1.0 gtk3
Bonjour,

1er bug : Je suis tombé dessus il y a quelques jours, c'est lié à la nouvelle version de wxPython. Pour le corriger, vous devez récupérer la nouvelle version du fichier Ctrl/CTRL_Assistant_base.py sur github (écrasez l'ancienne version de ce fichier).

2ème bug : Je n'ai pas réussi à le reproduire chez moi.

Ivan

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

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