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.

1 Like

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

1 Like

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)
1 Like

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.

3 Likes

Has this got a solution? I am working on 0.26.0 of rasa x and I am finding the same trouble.

@ashispapu @labeebee, is this still happening? Can you post logs of the rasa-x container?

I have the same issue. But I did a reinstall after having problems with nginx.

Hi @Joe-Anandarajah, did the reinstall fix the issue?

Hi I have the same problem :frowning: Ubuntu 18.04 LTS - fresh installation.

All steps like in docs. First sudo curl -sSL -o install.sh https://storage.googleapis.com/rasa-x-releases/0.29.1/install.sh, after this sudo bash ./install.sh and finally sudo docker-compose up -d

artur@ml:/etc/rasa$ sudo docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                                         NAMES
788108cdb583        rasa/nginx:0.29.1           "/opt/bitnami/entryp…"   10 hours ago        Up 10 hours         0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp   rasa_nginx_1
c2ca72c94d55        rasa/rasa-x-demo:0.29.0     "./entrypoint.sh run…"   10 hours ago        Up 10 hours         5055/tcp                                      rasa_app_1
8374c7801e3f        rasa/rasa:1.10.0-full       "rasa x --no-prompt …"   10 hours ago        Up About an hour    5005/tcp                                      rasa_rasa-worker_1
f173e5b84c89        rasa/rasa:1.10.0-full       "rasa x --no-prompt …"   10 hours ago        Up About an hour    5005/tcp                                      rasa_rasa-production_1
63ec3125af6f        rasa/rasa-x:0.29.1          "sh -c 'user_id=$(id…"   10 hours ago        Up 53 seconds       5002/tcp                                      rasa_rasa-x_1
77a5b580c2f8        bitnami/postgresql:11.7.0   "/opt/bitnami/script…"   10 hours ago        Up 10 hours         5432/tcp                                      rasa_db_1
3743da2f69fe        bitnami/redis:5.0.8         "/opt/bitnami/script…"   10 hours ago        Up 10 hours         6379/tcp                                      rasa_redis_1
1cfae497ac80        bitnami/rabbitmq:3.8.3      "/opt/bitnami/script…"   10 hours ago        Up 10 hours         4369/tcp, 5672/tcp, 15672/tcp, 25672/tcp      rasa_rabbit_1
e4fcaa8a061e        rasa/duckling:0.1.6.3       "duckling-example-ex…"   10 hours ago        Up 10 hours         8000/tcp                                      rasa_duckling_1 

So all working, but it seems that rasa/rasa-x:0.29.1 is restarting all the time :frowning:

artur@ml:/etc/rasa$ sudo python rasa_x_commands.py create --update admin me rasarasa
ERROR:__main__:Failed to create user.

Any solution ???

@artlion, can you share logs for your rasa-x service? You can retrieve them with sudo docker-compose logs rasa_rasa-x_1. Thanks!

Hi all. My fault. I checked logs and recognize that my firewall was blocking connection to database (NFTABLES). When I changed rules everything start working smoothly. Thanks for support.

may i knwo what modification have you done

i’m experiencing the same issue. how did you solve it @artlion?

Look two notes above your question - solution was simple :slight_smile:

strange, it wasn’t working when I used a numeric password but worked when I used string.

How to solve this error i am struggling with this…please help

Add ‘sudo’ before this command. Only root has access right to this python script .