victoryhb / constraction

Constraction is an open-source tool for the automatic extraction and interactive exploration of linguistic constructions
GNU General Public License v3.0
6 stars 0 forks source link

error mining and exploring constructions after uploading json file #2

Closed VeroJulianaSchmalz closed 1 month ago

VeroJulianaSchmalz commented 2 months ago

Dear,

after having to change the foreign_keys in db_manager.py in Pattern and Position to foreign_key="task.id" and foreign_key="pattern.id" to be able to launch Streamlit without the assertion error as follows:

Error Traceback:
File "/Users/u0148283/miniconda3/envs/nim_env/lib/python3.7/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
File "/Users/u0148283/constraction/src/server.py", line 10, in <module>
    import db_manager
File "/Users/u0148283/constraction/src/db_manager.py", line 35, in <module>
    class Position(SQLModel, table=True):
File "/Users/u0148283/miniconda3/envs/nim_env/lib/python3.7/site-packages/sqlmodel/main.py", line 478, in __new__
    col = get_column_from_field(v)
File "/Users/u0148283/miniconda3/envs/nim_env/lib/python3.7/site-packages/sqlmodel/main.py", line 645, in get_column_from_field
    assert isinstance(foreign_key, str)

I get the following errors - after loading my patterns.json file and creating a project :

Screenshot 2024-07-09 at 17 42 48 Screenshot 2024-07-09 at 17 43 23 Screenshot 2024-07-09 at 17 43 49

How can I solve these issues?