Rasa x not working

Dears, I installed the latest release of Rasa x locally on macOS. once I tried to lunch the rasa using the command “Rasa x”. I faced the following issue.

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
cursor, statement, parameters, context
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: table _alembic_tmp_conversation_event already exists

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

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasa/cli/x.py", line 431, in run_locally
args, project_path, args.data, token=rasa_x_token, config_path=config_path
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasax/community/local.py", line 205, in main
sql_migrations.run_migrations(session)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasax/community/sql_migrations.py", line 25, in run_migrations
_run_schema_migrations(session)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasax/community/sql_migrations.py", line 41, in _run_schema_migrations
_run_alembic_migration(alembic_config)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasax/community/sql_migrations.py", line 65, in _run_alembic_migration
command.upgrade(alembic_config, target_revision)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/command.py", line 298, in upgrade
script.run_env()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/util/compat.py", line 184, in load_module_py
spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/env.py", line 96, in <module>
run_migrations_online()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/env.py", line 86, in run_migrations_online
context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
self.get_context().run_migrations(**kw)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/runtime/migration.py", line 520, in run_migrations
step.migration_fn(**kw)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/versions/migration_2020_02_06_fixed_remove_is_unflagged_field_from__8a260b1a797a.py", line 25, in upgrade
migration_utils.drop_column("conversation_event", "is_unflagged")
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/utils.py", line 112, in drop_column
batch_op.drop_column(column)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 88, in __exit__
next(self.gen)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/operations/base.py", line 354, in batch_alter_table
impl.flush()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/operations/batch.py", line 116, in flush
batch_impl._create(self.impl)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/operations/batch.py", line 343, in _create
op_impl.create_table(self.new_table)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/ddl/impl.py", line 258, in create_table
self._exec(schema.CreateTable(table))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/alembic/ddl/impl.py", line 140, in _exec
return conn.execute(construct, *multiparams, **params)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1014, in execute
return meth(self, multiparams, params)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/sql/ddl.py", line 72, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1076, in _execute_ddl
compiled,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1318, in _execute_context
e, statement, parameters, cursor, context
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1512, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1278, in _execute_context
cursor, statement, parameters, context
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table _alembic_tmp_conversation_event already exists
[SQL: 
CREATE TABLE _alembic_tmp_conversation_event (
    id INTEGER NOT NULL, 
    conversation_id VARCHAR(255), 
    type_name VARCHAR(255) NOT NULL, 
    timestamp FLOAT, 
    intent_name VARCHAR(255), 
    action_name VARCHAR(255), 
    policy VARCHAR(255), 
    is_flagged BOOLEAN, 
    data TEXT, 
    evaluation TEXT, 
    rasa_environment VARCHAR(255) DEFAULT 'production', 
    PRIMARY KEY (id), 
    CHECK (is_flagged IN (0, 1)), 
    FOREIGN KEY(conversation_id) REFERENCES conversation (sender_id)
)

]
(Background on this error at: http://sqlalche.me/e/13/e3q8)

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: https://forum.rasa.com/.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/spawn.py", line 105, in spawn_main
exitcode = _main(fd)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/synchronize.py", line 110, in __setstate__
self._semlock = _multiprocessing.SemLock._rebuild(*state)
FileNotFoundError: [Errno 2] No such file or directory

anyone can help in that. Thanks

Hi @mohocp, can you try deleting the events.db and rasa.db files from your directory if they already exist?

1 Like

Hi @akelad

I just moved to rasa 2xx now and I believe I am having the same problem, would you please help me out?

 File "/Users/edenconstantino/opt/anaconda3/envs/rasa2/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/versions/migration_2021_03_31_add_intent_evaluation_result_no_examples_column_1080027ae561.py", line 20, in <module>
    import rasax.community.database.schema_migrations.alembic.utils as migration_utils
  File "/Users/edenconstantino/opt/anaconda3/envs/rasa2/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/utils.py", line 12, in <module>
    from sqlalchemy.engine import reflection, RowProxy, Connection
ImportError: cannot import name 'RowProxy'

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: https://forum.rasa.com/.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/edenconstantino/opt/anaconda3/envs/rasa2/lib/python3.6/multiprocessing/spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "/Users/edenconstantino/opt/anaconda3/envs/rasa2/lib/python3.6/multiprocessing/spawn.py", line 115, in _main
    self = reduction.pickle.load(from_parent)
  File "/Users/edenconstantino/opt/anaconda3/envs/rasa2/lib/python3.6/multiprocessing/synchronize.py", line 110, in __setstate__
    self._semlock = _multiprocessing.SemLock._rebuild(*state)
FileNotFoundError: [Errno 2] No such file or directory

TIA

Eden,

I removed the files events.db and rasa.db and install SQLAlchemy

pip install SQLAlchemy==1.3.22

it is working now, Hope I dont run to these problems in Production :crossed_fingers:

Hi @akelad , I am getting same exception "ImportError: cannot import name ‘Row’ from ‘sqlalchemy.engine’ (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sqlalchemy/engine/init.py)

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: https://forum.rasa.com/.".

I have tried deleting the events.db and rasa.db still ended up with the same error.

Please suggest. Below is the list of versions installed: pip. : 21.2.4 rasa : 2.8.6 rasa-sdk :2.8.1 rasa-x :.42.2 SQLAlchemy :1.3.22