paulpierre / RasaGPT

๐Ÿ’ฌ RasaGPT is the first headless LLM chatbot platform built on top of Rasa and Langchain. Built w/ Rasa, FastAPI, Langchain, LlamaIndex, SQLModel, pgvector, ngrok, telegram
https://rasagpt.dev
MIT License
2.36k stars 227 forks source link

Error when "Created project: Pepetamine": psycopg2.errors.UndefinedFunction: operator does not exist: entity_status = integer. #73

Closed Chan-swjtu closed 8 months ago

Chan-swjtu commented 8 months ago

DEBUG:config:๐Ÿ—‚๏ธ Created project: Pepetamine ๐Ÿ—‚๏ธ Created project: Pepetamine Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context self.dialect.do_execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute cursor.execute(statement, parameters) psycopg2.errors.UndefinedFunction: operator does not exist: entity_status = integer LINE 3: ...splay_name = 'project-pepetamine.md' AND document.status = 2 ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/api/seed.py", line 162, in create_document_by_file_path( File "/app/api/helpers.py", line 284, in create_document_by_file_path document = get_document_by_name( File "/app/api/helpers.py", line 514, in get_document_by_name return session.exec( File "/usr/local/lib/python3.9/site-packages/sqlmodel/orm/session.py", line 60, in exec results = super().execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1714, in execute result = conn._execute_20(statement, params or {}, execution_options) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20 return meth(self, args_10style, kwargs_10style, execution_options) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection return connection._execute_clauseelement( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement ret = self._execute_context( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context self._handle_dbapi_exception( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapiexception util.raise( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 211, in raise_ raise exception File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context self.dialect.do_execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) operator does not exist: entity_status = integer LINE 3: ...splay_name = 'project-pepetamine.md' AND document.status = 2 ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts.

[SQL: SELECT document.id, document.uuid, document.organization_id, document.project_id, document.display_name, document.url, document.data, document.hash, document.version, document.status, document.created_at, document.updated_at FROM document WHERE %(param_1)s = document.project_id AND document.display_name = %(display_name_1)s AND document.status = %(status_1)s] [parameters: {'param_1': 1, 'display_name_1': 'project-pepetamine.md', 'status_1': 2}] (Background on this error at: https://sqlalche.me/e/14/f405) make[1]: [Makefile:126: seed] Error 1 make[1]: Leaving directory '/home/ubuntu/RasaGPT' make: [Makefile:62: install] Error 2

Chan-swjtu commented 8 months ago

Change "Document.status == ENTITY_STATUS.ACTIVE.value" to "Document.status == ENTITY_STATUS.ACTIVE" in file \app\api\helpers.py, and similar statements likewise.