Application fails when import directory does not contain a .ptyx file.
Opened this issue · 2 comments
PYTHONHASHSEED: 0
created temporary directory /tmp/mcq-editor-588f_1f4
finalize([])
Side.LEFT: docs.current_index=0
Side.RIGHT: no document to select.
started...
Waiting for process 6185
End of process 6185
Loading extension 'mcq'...
Parsing MCQ...
STRUCTURE:
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/difference-fractions.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/ensemble-definition.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/ensemble-definition.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/ensemble-definition.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/equation-valeur-absolue.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/inequation-x2.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/inequation-x2.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/inequation-x2.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/inequation-x2.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/inequation-x2.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/inequation-x2.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/inequation-x2.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/developper.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/difference-identites-remarquables.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/difference-identites-remarquables.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/difference-identites-remarquables.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/difference-identites-remarquables.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/factoriser-A2-B2.ex"
IMPORTING "/home/nicolas/prog/mcq-questions/maths-discretes/calcul/puissances-signes-x-y.ex"
Process data successfully recovered.
File /tmp/mcq-editor-588f_1f4/qcm-ie2-24-25-ANaYbR1OeKc.tex compiled.
Full log written on /tmp/mcq-editor-588f_1f4/qcm-ie2-24-25-ANaYbR1OeKc.log.
File /tmp/mcq-editor-588f_1f4/qcm-ie2-24-25-ANaYbR1OeKc.tex compiled.
Full log written on /tmp/mcq-editor-588f_1f4/qcm-ie2-24-25-ANaYbR1OeKc.log.
End of task: emit 'finished' event.
Directive-open: current_line=30
change_doc_state(doc=<Document 1: /home/nicolas/Documents Famille/nicolas/Travail/enseignements/S1/6-R106-maths discretes/devoirs/2-IE2/24-25/qcm-ie2-24-25 (saved: True)>, is_saved=False)
Side.LEFT: docs.current_index=0
Side.RIGHT: no document to select.
save_doc(side=None, index=None)
save_doc_as(None, None, PosixPath('/home/nicolas/Documents Famille/nicolas/Travail/enseignements/S1/6-R106-maths discretes/devoirs/2-IE2/24-25/qcm-ie2-24-25'))
Requesting document 0 (max=0) of side left.
change_doc_state(doc=<Document 1: /home/nicolas/Documents Famille/nicolas/Travail/enseignements/S1/6-R106-maths discretes/devoirs/2-IE2/24-25/qcm-ie2-24-25 (saved: True)>, is_saved=True)
Side.LEFT: docs.current_index=0
Side.RIGHT: no document to select.
save_doc()
save_doc_as(None, None, PosixPath('/home/nicolas/Documents Famille/nicolas/Travail/enseignements/S1/6-R106-maths discretes/devoirs/2-IE2/24-25/qcm-ie2-24-25'))
Requesting document 0 (max=0) of side left.
change_doc_state(doc=<Document 1: /home/nicolas/Documents Famille/nicolas/Travail/enseignements/S1/6-R106-maths discretes/devoirs/2-IE2/24-25/qcm-ie2-24-25 (saved: True)>, is_saved=True)
Side.LEFT: docs.current_index=0
Side.RIGHT: no document to select.
Updating imports for file /home/nicolas/Documents Famille/nicolas/Travail/enseignements/S1/6-R106-maths discretes/devoirs/2-IE2/24-25/qcm-ie2-24-25...
Traceback (most recent call last):
File "/home/nicolas/Documents Famille/nicolas/prog/ptyx-mcq/ptyx_mcq/tools/io_tools.py", line 14, in get_file_or_sysexit
return get_file_with_extension(path, extension=extension)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nicolas/Documents Famille/nicolas/prog/ptyx-mcq/ptyx_mcq/tools/io_tools.py", line 40, in get_file_with_extension
raise FileNotFoundError(f"No '{extension}' file found in '{path}'.")
FileNotFoundError: No '.ptyx' file found in '/home/nicolas/Documents Famille/nicolas/Travail/enseignements/S1/6-R106-maths discretes/devoirs/2-IE2/24-25/qcm-ie2-24-25'.
Searching for a '.ptyx' file in '/home/nicolas/Documents Famille/nicolas/Travail/enseignements/S1/6-R106-maths discretes/devoirs/2-IE2/24-25/qcm-ie2-24-25' failed !
[Error] No '.ptyx' file found.
Segmentation fault
The reason of the missing file error is that the file was saved without extension.