Rasa X wont open

Hi there, I am trying to run basic setup with Rasa X and am having issues getting the GUI to run. I have accepted the licenses in the CLI, and now I am just getting this error whenever I try to run the rasa x command.

~/code/rasa-training/rasa-local
āÆ rasa x -v

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.

Starting Rasa X in local mode... šŸš€
Traceback (most recent call last):
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
cursor, statement, parameters, context
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
cursor.execute(statement, parameters)
sqlite3.IntegrityError: FOREIGN KEY constraint failed

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

Traceback (most recent call last):
  File "/anaconda3/lib/python3.7/site-packages/rasa/cli/x.py", line 244, in rasa_x
local.main(args, project_path, args.data, token=rasa_x_token)
  File "/anaconda3/lib/python3.7/site-packages/rasax/community/local.py", line 194, in main
session)
  File "/anaconda3/lib/python3.7/site-packages/rasax/community/local.py", line 144, in _initialize_with_local_data
LOCAL_PROJECT_NAME,
  File "/anaconda3/lib/python3.7/site-packages/rasax/community/api/initialise.py", line 170, in inject_domain
username=username)
  File "/anaconda3/lib/python3.7/site-packages/rasax/community/services/projects_service.py", line 73, in store_domain
self.session.commit()
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 1026, in commit
self.transaction.commit()
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 493, in commit
self._prepare_impl()
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 472, in _prepare_impl
self.session.flush()
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2451, in flush
self._flush(objects)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2589, in _flush
transaction.rollback(_capture_exception=True)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
raise value
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2549, in _flush
flush_context.execute()
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rec.execute(self)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute
uow,
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
insert,
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 1120, in _emit_insert_statements
statement, params
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute
return meth(self, multiparams, params)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
distilled_params,
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
e, statement, parameters, cursor, context
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
raise value.with_traceback(tb)
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
cursor, statement, parameters, context
  File "/anaconda3/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) FOREIGN KEY constraint failed
[SQL: INSERT INTO template (template, text, content, annotator_id, annotated_at, project_id, domain_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('utter_greet', 'Hey! How are you?', '{"text": "Hey! How are you?"}', 'rohitsubramanya.karra@bestbuy.com', 1559330843.2708101, 'default', 1)]
(Background on this error at: http://sqlalche.me/e/gkpj)

Sorry, something went wrong (see error above). Make sure to start Rasa X with valid data and valid domain and config files. Please, also check any warnings that popped up.
If you need help fixing the issue visit our forum: http://forum.rasa.com/.

Also, rasa refuses to start without passing in the -v prompt.

Any suggestions? Thanks.

1 Like

Leaving this here in case anyone else encounters this. I had a DEFAULT_USERNAME environment variable set in my shell that was causing issues with SQL.

Once I called unset DEFAULT_USERNAME I was fine.

Still curious why I need to start this with the -v prompt though.

1 Like