When trying to run Rasa X, got "revision not found" error

Hi guys! I’m really enjoying to project using rasa stack, thanks for the wonderfull work :slight_smile:

I’ve used rasa x before many times, but today I am experiencing a strange error: when running “rasa x” on terminal, I get this error, which I did not found anywhere:

Traceback (most recent call last):
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/base.py", line 158, in _catch_revision_errors
    yield
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/base.py", line 360, in _upgrade_revs
    revs = list(revs)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 755, in _iterate_revisions
    requested_lowers = self.get_revisions(lower)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 319, in get_revisions
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 319, in <listcomp>
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 324, in get_revisions
    for rev_id in resolved_id
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 324, in <genexpr>
    for rev_id in resolved_id
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 387, in _revision_for_ident
    resolved_id,
alembic.script.revision.ResolutionError: No such revision or branch '8893bba2a522'

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

Traceback (most recent call last):
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/rasa/cli/x.py", line 429, in run_locally
    args, project_path, args.data, token=rasa_x_token, config_path=config_path
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/rasax/community/local.py", line 208, in main
    sql_migrations.run_migrations(session)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/rasax/community/sql_migrations.py", line 25, in run_migrations
    _run_schema_migrations(session)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/rasax/community/sql_migrations.py", line 41, in _run_schema_migrations
    _run_alembic_migration(alembic_config)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/rasax/community/sql_migrations.py", line 65, in _run_alembic_migration
    command.upgrade(alembic_config, target_revision)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/command.py", line 276, in upgrade
    script.run_env()
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/base.py", line 475, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 90, in load_python_file
    module = load_module_py(module_id, path)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/util/compat.py", line 177, in load_module_py
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/rasax/community/database/schema_migrations/alembic/env.py", line 89, in <module>
    run_migrations_online()
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/rasax/community/database/schema_migrations/alembic/env.py", line 79, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/runtime/environment.py", line 839, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/runtime/migration.py", line 351, in run_migrations
    for step in self._migrations_fn(heads, self):
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/command.py", line 265, in upgrade
    return script._upgrade_revs(revision, rev)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/base.py", line 365, in _upgrade_revs
    for script in reversed(list(revs))
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/base.py", line 190, in _catch_revision_errors
    compat.raise_from_cause(util.CommandError(resolution))
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/util/compat.py", line 295, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=exc_value)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/util/compat.py", line 288, in reraise
    raise value.with_traceback(tb)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/base.py", line 158, in _catch_revision_errors
    yield
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/base.py", line 360, in _upgrade_revs
    revs = list(revs)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 755, in _iterate_revisions
    requested_lowers = self.get_revisions(lower)
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 319, in get_revisions
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 319, in <listcomp>
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 324, in get_revisions
    for rev_id in resolved_id
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 324, in <genexpr>
    for rev_id in resolved_id
  File "/home/luan/anaconda3/envs/rasa/lib/python3.7/site-packages/alembic/script/revision.py", line 387, in _revision_for_ident
    resolved_id,
alembic.util.exc.CommandError: Can't locate revision identified by '8893bba2a522'

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/.

Additionally, when running locally, everything works fine.

Any ideias?

Thanks in advance!

Hey @lgabs,

We typically recommend running deploying Rasa X to a server in order to collection conversations, you would need to leave it continually running, etc.

That being said if you want to fix this issue can you tell me what version you are running? It might be worth updating to the latest as well depending on what version you are on atm.

The alternative locally is running Rasa Open Source and using rasa shell to interact with your assistant then deploy Rasa X on a server setup for other users to communicate with it and be able to annotate and update your assistant from these conversations.

Thanks

1 Like

I get this after changing the Rasa x version in the .env file:

rasa-x_1           | INFO:alembic.runtime.migration:Context impl PostgresqlImpl.
rasa-x_1           | INFO:alembic.runtime.migration:Will assume transactional DDL.
rasa-x_1           | Traceback (most recent call last):
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/alembic/script/base.py", line 158, in _catch_revision_errors
rasa-x_1           |     yield
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/alembic/script/base.py", line 360, in _upgrade_revs
rasa-x_1           |     revs = list(revs)
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/alembic/script/revision.py", line 755, in _iterate_revisions
rasa-x_1           |     requested_lowers = self.get_revisions(lower)
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/alembic/script/revision.py", line 319, in get_revisions
rasa-x_1           |     return sum([self.get_revisions(id_elem) for id_elem in id_], ())
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/alembic/script/revision.py", line 319, in <listcomp>
rasa-x_1           |     return sum([self.get_revisions(id_elem) for id_elem in id_], ())
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/alembic/script/revision.py", line 324, in get_revisions
rasa-x_1           |     for rev_id in resolved_id
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/alembic/script/revision.py", line 324, in <genexpr>
rasa-x_1           |     for rev_id in resolved_id
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/alembic/script/revision.py", line 387, in _revision_for_ident
rasa-x_1           |     resolved_id,
rasa-x_1           | alembic.script.revision.ResolutionError: No such revision or branch 'b49ca6b367e3'

It would be great to have some more information on this error.

By the way, I am running with docker compose.

Here the portion of my .env file related to rasa x:

RASA_X_VERSION=0.26.1
RASA_VERSION=1.8.0
RASA_X_DEMO_VERSION=0.26.0

It was all working fine until I switched the versions testing to get a working pair of RASA_X_VERSION and RASA_X_DEMO_VERSION

@argideritzalpea what was the version of Rasa X you were using previously?

@akelad

RASA_X_VERSION=latest
RASA_VERSION=1.8.0
RASA_X_DEMO_VERSION=0.26.0 

The above had been working for me until I updated Rasa X to 0.26.1 following the Rasa X update instructions. Now, switching back from 0.26.1 to latest won’t work also (updating, of course) - when I try to converse with models I train and curl to Rasa X, the chat “…” remains “typing” a response forever, and won’t refresh in the UI. When I restart the containers, however, I will see that the chat indeed proceed as expected and text is returned.

I also consistently receive this error when I attempt to discard changes in Git from the UI:

rasa-x_1           | Job "GitService.run_background_synchronization (trigger: cron[minute='*'], next run at: 2020-03-23 02:50:00 UTC)" raised an exception
rasa-x_1           | Traceback (most recent call last):
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/apscheduler/executors/base.py", line 125, in run_job
rasa-x_1           |     retval = job.func(*job.args, **job.kwargs)
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/rasax/community/services/integrated_version_control/git_service.py", line 851, in run_background_synchronization
rasa-x_1           |     git_service.synchronize_project(force_data_injection)
rasa-x_1           |   File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/rasax/community/services/integrated_version_control/git_service.py", line 695, in synchronize_project
rasa-x_1           |     await self._inject_data()
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/rasax/community/services/integrated_version_control/git_service.py", line 725, in _inject_data
rasa-x_1           |     str(self.repository_path()), str(data_path), self.session, SYSTEM_USER
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/rasax/community/initialise.py", line 293, in inject_files_from_disk
rasa-x_1           |     username,
rasa-x_1           |   File "/usr/local/lib/python3.6/site-packages/rasax/community/initialise.py", line 129, in inject_domain
rasa-x_1           |     rasa_cli_utils.error_and_exit(
rasa-x_1           | AttributeError: module 'rasa.cli.utils' has no attribute 'error_and_exit'

already addressing this in a different post…