RAsa X User Creation

Getting the below error while running the below command

sudo python rasa_x_commands.py create --update admin me PASSWORD

File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "project" does not exist
LINE 2: FROM project 
             ^


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

Traceback (most recent call last):
  File "/app/scripts/manage_users.py", line 139, in <module>
    create_project_and_settings(settings_service, role_service, team_name)
  File "/usr/local/lib/python3.6/site-packages/rasax/community/initialise.py", line 205, in create_project_and_settings
    existing = _settings_service.get(team, project_id)
  File "/usr/local/lib/python3.6/site-packages/rasax/community/services/settings_service.py", line 78, in get
    project = self._get_project(team, project_id)
  File "/usr/local/lib/python3.6/site-packages/rasax/community/services/settings_service.py", line 94, in _get_project
    .filter(and_(Project.project_id == project_id, Project.team == team))
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3215, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3007, in __getitem__
    return list(res)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3317, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3342, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 988, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
    distilled_params,
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "project" does not exist
LINE 2: FROM project 
             ^

[SQL: SELECT project.project_id AS project_project_id, project.team AS project_team, project.active_model AS project_active_model, project.config AS project_config, project.handoff_url AS project_handoff_url 
FROM project 
WHERE project.project_id = %(project_id_1)s AND project.team = %(team_1)s 
 LIMIT %(param_1)s]
[parameters: {'project_id_1': 'default', 'team_1': 'rasa', 'param_1': 1}]
(Background on this error at: http://sqlalche.me/e/f405)
ERROR:__main__:Failed to create user.

Any help is appreciated.

Hi @ashispapu, does this happen on a fresh Docker installation of Rasa X? Would you be able to share steps to reproduce this?

Hi ricwo,

I’m following the instructions given in the below URL.

Quick Installation

I can see the below docker container status.

93fee86c5fcb rasa/rasa-x:stable “python -m rasax.com…” 4 minutes ago Restarting (1) 38 seconds ago The above docker is always in restarting mode

Hi @ashispapu, what operating system is this happening on? I would be good to check if this still happens with the latest patch release 0.19.2. Could you please try the following:

  1. sudo docker-compose down
  2. sudo docker system prune -a -f
  3. cd ~ && sudo rm -rf /etc/rasa
  4. follow the installation instructions again, including the initial curl that downloads the install script (with 0.19.2 in its path)

I’m on Ubuntu 16.04.

Try using command python3 instead.

E.g. sudo python3 rasa_x_commands.py create --update admin me PASSWORD

Works at least on Ubuntu 18.04.