The-Weather-TEAM / Life-SCORE

Evaluation personnalisée d'une ville française choisie par rapport à l'utilisateur
GNU General Public License v3.0
8 stars 2 forks source link

Erreur si manipulation précise (donnees) #89

Closed Farenc21 closed 1 year ago

Farenc21 commented 1 year ago

Si le qcm est déja fait, qu'on choisis de supprimer les données utilisateurs (avec la page paramètres) et que dazns la page principale on fait continuer, il va pas savoir quoi nous mettre entre le qcm et la suite donc ca fait une erreur


Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\tkinter\__init__.py", line 1921, in __call__
    return self.func(*args)
  File "C:\Users\Raf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\customtkinter\windows\widgets\ctk_button.py", line 531, in _clicked
    self._command()
  File "c:\Users\Raf\Life-SCORE\code\LifeSCORE.py", line 274, in <lambda>
    btn_ok = interface.CTkButton(win, height=int(win.winfo_screenheight()/10), command=lambda: avancer(win), text="Lancer la recherche",font=('Arial Black',30)) #appele la fonction question1
  File "c:\Users\Raf\Life-SCORE\code\LifeSCORE.py", line 309, in avancer
    w_question(fenetre) #Ouvre la seconde fenêtre : Fin de la première
  File "c:\Users\Raf\Life-SCORE\code\LifeSCORE.py", line 569, in w_question
    creation_fichiers("Rajout des lignes") #rajoute les lignes au dico csv dès qu'on quitte la page de QCM
  File "c:\Users\Raf\Life-SCORE\code\LifeSCORE.py", line 236, in creation_fichiers
    if not len(pandas.read_csv(nom_du_repertoire+'/donnees/csv/csv_dico.csv')) +1 == len(list_Questions):
  File "C:\Users\Raf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\util\_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\Raf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\util\_decorators.py", line 331, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\Raf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\io\parsers\readers.py", line 950, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "C:\Users\Raf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\io\parsers\readers.py", line 605, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "C:\Users\Raf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\io\parsers\readers.py", line 1442, in __init__
    self._engine = self._make_engine(f, self.engine)
  File "C:\Users\Raf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\io\parsers\readers.py", line 1735, in _make_engine
    self.handles = get_handle(
  File "C:\Users\Raf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pandas\io\common.py", line 856, in get_handle
    handle = open(
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\Users\\Raf\\Life-SCORE\\code/donnees/csv/csv_dico.csv'```
Farenc21 commented 1 year ago

Réglé ? quand on appuie sur le bouton "supprimer les donnees" j'utilise la commande sys.exit() mais je ne sais pas si c'est une bonne alternative (la commande arrête tout simplement le programme)