AOSSIE-Org / EduAid

A tool that can auto-generate short quizzes on the basis of the content provided.
7 stars 25 forks source link

Couldn't find s2v_old folder #49

Closed akashjpal closed 1 month ago

akashjpal commented 1 month ago

Description: The issue says it didn't find any s2v_old folder in root directory. This line created the issue in backend/Generator/main.py

file

self.s2v = Sense2Vec().from_disk('s2v_old')

Issue:

Traceback (most recent call last):
  File "C:\Users\ASPIRE\Desktop\New folder\EduAid\backend\server.py", line 31, in <module>
    MCQGen = main.MCQGenerator()
             ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ASPIRE\Desktop\New folder\EduAid\backend\Generator\main.py", line 34, in __init__
    self.s2v = Sense2Vec().from_disk('s2v_old')
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ASPIRE\Desktop\New folder\EduAid\.env\Lib\site-packages\sense2vec\sense2vec.py", line 354, in from_disk
    self.vectors = Vectors().from_disk(path)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "spacy\vectors.pyx", line 718, in spacy.vectors.Vectors.from_disk
  File "C:\Users\ASPIRE\Desktop\New folder\EduAid\.env\Lib\site-packages\spacy\util.py", line 1372, in from_disk
    reader(path / key)
  File "spacy\vectors.pyx", line 711, in spacy.vectors.Vectors.from_disk.lambda8
  File "spacy\strings.pyx", line 268, in spacy.strings.StringStore.from_disk
  File "C:\Users\ASPIRE\Desktop\New folder\EduAid\.env\Lib\site-packages\srsly\_json_api.py", line 51, in read_json
    file_path = force_path(path)
                ^^^^^^^^^^^^^^^^
  File "C:\Users\ASPIRE\Desktop\New folder\EduAid\.env\Lib\site-packages\srsly\util.py", line 24, in force_path
    raise ValueError(f"Can't read file: {location}")
ValueError: Can't read file: s2v_old\strings.json
Roaster05 commented 1 month ago

Hey @akashjpal, the error you encountered is due to the missing s2v_old package, which needs to be manually installed in the backend directory. Since we are still in the development phase, we haven't updated the README for our project yet. However, you can check out issue #40 for more details.