RASA X not working Locally

My laptop configurations are not enough to install rasa so , I created an instance in Microsoft azure (Ubuntu 18.04). Then I did the installations as per the docs of Rasa OSS, I have the basic rasa project . Then I went to the directory where my rasa project is and then I run (rasa x ) installations as per the docs. But as you mentioned above that it will give me the access to the url automatically but its not. I am Asking as I am using instance and I want to install rasa x so which installations should i go for either (Local Mode Installations) or (Server Installations).

Thank you @nik202 for this much help it means a lot to me.

no such .db files are generated

getting different kind of error now
ceback (most recent call last):
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasa/cli/x.py", line 501, in run_locally
    domain_path=domain_path,
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/local.py", line 242, in main
    project_path, data_path, session, args.port, config_path, domain_path
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/local.py", line 169, in _initialize_with_local_data
    domain_path=domain_path,
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/initialise.py", line 381, in inject_files_from_disk
    nlu_files, constants.COMMUNITY_PROJECT_NAME, username, data_service, nlg_service
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/initialise.py", line 101, in inject_nlu_data
    nlu_files, project_id, username
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1809, in save_bulk_data_from_files
    add_data_items_to_domain=False,
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1949, in save_bulk_data
    self.save_additional_training_features(project_id, training_data, filename)
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 758, in save_additional_training_features
    project_id, training_data.entity_synonyms, filename
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 697, in _bulk_save_entity_synonyms
    project_id, synonym_name, mapped_values, filename
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1079, in create_entity_synonym
    project_id, entity_synonym.id, mapped_values
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1331, in add_entity_synonym_mapped_values
    f"Value to map '{entity_synonym.name}' is equal to the entity "
  File "/home/katomaran/Athul/environment/rasa/lib/python3.6/site-packages/rasax/community/utils/cli.py", line 84, in raise_warning
    warnings.warn(message, category=category, **kwargs)
  File "/usr/lib/python3.6/warnings.py", line 101, in _showwarnmsg
    _showwarnmsg_impl(msg)
  File "/usr/lib/python3.6/warnings.py", line 28, in _showwarnmsg_impl
    text = _formatwarnmsg(msg)
  File "/usr/lib/python3.6/warnings.py", line 116, in _formatwarnmsg
    msg.filename, msg.lineno, line=msg.line)
TypeError: formatwarning() got an unexpected keyword argument 'line

’

@athulvingt can you share me rasa version rasa --version

i don’t recall whats was my rasa version, I guess i was using latest version, after seeing your comment i downgraded everything to pip3 install rasa==2.6.2 pip3 install rasa-sdk==2.6.0 pip3 install rasa-x==0.40.0 --extra-index-url https://pypi.rasa.com/simple then I got this error

  File "/usr/lib/python3.6/warnings.py", line 116, in _formatwarnmsg
    msg.filename, msg.lineno, line=msg.line)
TypeError: formatwarning() got an unexpected keyword argument 'line

after that i created new env and downgraded pip to 20.20, now i cant even install rasa, rasa-sdk and rasa-x

@athulvingt Well, which comment you have seen? I’m sure that can be the dedicated solution for that error that user, but don’t worry I will solve your query again.:slight_smile:

@athulvingt activate your conda environment and share me rasa --version, please.

@athulvingt Its more safe if you create the fresh conda environment.

@athulvingt after that just follow this and you will be able to solve your query

pip install rasa==2.8.2 or 2.8.1 | pip install rasa-sdk==2.8.2 or 2.8.1

check version rasa --version its install or not

then

pip install rasa-x==0.39.3 --extra-index-url https://pypi.rasa.com/simple

check rasa version rasa --version its install or not

You will see some error : ImportError: cannot import name ‘RowProxy’ from ‘sqlalchemy.engine’ Install

pip install SQLAlchemy==1.3.22 should fix it

If sanic related error: pip install sanic-jwt==1.6.0

delete .db if is showing alembic error issue.

Any error share please :slight_smile:

Good luck! I hope this will solve your issue.

1 Like

TypeError: formatwarning() got an unexpected keyword argument 'line' this is the error i got

and few things to add i am using python virtual env not conda, also i am using spacy entity extractor, so I tried installing rasa and then spacy + download en_core_web_sm, but during training it couldn’t detect spacy language model. The command I used to install rasa is pip3 install rasa[spacy]==2.8.2

@athulvingt are you able to install rasa x and basic mood bot?

I installed rasa X and what’s basic mood bot

@athulvingt the default rasa bot, and now are you able to install rasa-x; its working now?

Ref: rasa/examples/moodbot at main ¡ RasaHQ/rasa ¡ GitHub

I tried mood bot and Rasa, everything worked fine I guess. Though it showed some warnings, RASA X opened in the browser.But when I did the same for the chatbot I developed it didn’t open in browser These are the thinks shown on the screen

/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasa/shared/core/domain.py:2000: FutureWarning: The definition of slot mappings in your form should always be preceded by the keyword `required_slots`. The lack of this keyword will be deprecated in Rasa Open Source 3.0.0. Please see https://rasa.com/docs/rasa/forms for more information.
  f"The definition of slot mappings in your form "
Starting Rasa X in local mode... 🚀
/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasa/shared/utils/io.py:97: UserWarning: Issue found in '/tmp/tmpfesvx0pr': 
Found intent 'mood_great' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasa/shared/utils/io.py:97: UserWarning: Issue found in '/tmp/tmpfesvx0pr': 
Found intent 'mood_unhappy' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasa/shared/utils/io.py:97: UserWarning: Issue found in '/tmp/tmpfesvx0pr': 
Found intent 'bot_challenge' in stories which is not part of the domain.
  More info at https://rasa.com/docs/rasa/stories
Traceback (most recent call last):
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasa/cli/x.py", line 502, in run_locally
    domain_path=domain_path,
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/local.py", line 242, in main
    project_path, data_path, session, args.port, config_path, domain_path
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/local.py", line 169, in _initialize_with_local_data
    domain_path=domain_path,
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/initialise.py", line 381, in inject_files_from_disk
    nlu_files, constants.COMMUNITY_PROJECT_NAME, username, data_service, nlg_service
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/initialise.py", line 101, in inject_nlu_data
    nlu_files, project_id, username
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1809, in save_bulk_data_from_files
    add_data_items_to_domain=False,
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1949, in save_bulk_data
    self.save_additional_training_features(project_id, training_data, filename)
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 758, in save_additional_training_features
    project_id, training_data.entity_synonyms, filename
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 697, in _bulk_save_entity_synonyms
    project_id, synonym_name, mapped_values, filename
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1079, in create_entity_synonym
    project_id, entity_synonym.id, mapped_values
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/services/data_service.py", line 1331, in add_entity_synonym_mapped_values
    f"Value to map '{entity_synonym.name}' is equal to the entity "
  File "/home/katomaran/Desktop/environments/rasa/lib/python3.6/site-packages/rasax/community/utils/cli.py", line 84, in raise_warning
    warnings.warn(message, category=category, **kwargs)
  File "/usr/lib/python3.6/warnings.py", line 101, in _showwarnmsg
    _showwarnmsg_impl(msg)
  File "/usr/lib/python3.6/warnings.py", line 28, in _showwarnmsg_impl
    text = _formatwarnmsg(msg)
  File "/usr/lib/python3.6/warnings.py", line 116, in _formatwarnmsg
    msg.filename, msg.lineno, line=msg.line)
TypeError: formatwarning() got an unexpected keyword argument 'line'

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/.
/usr/lib/python3.6/multiprocessing/semaphore_tracker.py:143: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown
  len(cache))

@athulvingt did you trained the bot as per rasa-x new version?

This is the command i used to train rasa train , One more point to add data format of domain file in my chatbot and mood mot are different, eg, In mood bot:

entities: []
slots: {}

In my chatbot

slots:
  room_type:
    type: text
    influence_conversation: false
  hotelname:
    type: text
    influence_conversation: false

entities:
  - room_type
  - hotel_name

@athulvingt try run basic bot first, I guess this is not related to Rasa-X installation :thinking: @athulvingt delete older trained model and train again. @athulvingt check stories, intents, rules, domain and delete all not required intents and train the model.

The problem was with data folder, if that folder is removed everything works fine, i looked in deeper and found that the problem is with the synonyms in the training data. When I removed synonyms from the data, everything works. If wish if there is a way to make rasa x work with synonyms as well, or else i have to remove synonyms during rasa x and add it again when i want to train it

Hi I have install fresh rasa set up in venv rasa --version Rasa Version : 2.8.14 Minimum Compatible Version: 2.8.9 Rasa SDK Version : 2.8.2 Rasa X Version : 0.42.5 Python Version : 3.6.8 Operating System : Linux-3.10.0-1160.31.1.el7.x86_64-x86_64-with-centos-7.9.2009-Core Python Path : /usr/bin/python3

Name: rasa-x Version: 0.42.5 Summary: Machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants Home-page: https://rasa.com Author: Rasa Technologies GmbH Author-email: hi@rasa.com License: Location: /home/nlpuser/.local/lib/python3.6/site-packages Requires: aiohttp, alembic, apscheduler, attrs, croniter, cryptography, GitPython, isodate, jsonschema, kafka-python, pika, Pillow, psycopg2-binary, python-dateutil, questionary, rasa, redis, requests, ruamel.yaml, sanic, sanic-cors, sanic-jwt, setuptools, SQLAlchemy, tarsafe, ujson, urllib3 Required-by:

yet I get

rasa x
Starting Rasa X in local mode... 🚀
Traceback (most recent call last):
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1706, in _execute_context
    cursor, statement, parameters, context
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such index: msg_log_workspace_id_idx

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

Traceback (most recent call last):
  File "/home/nlpuser/.local/lib/python3.6/site-packages/rasa/cli/x.py", line 502, in run_locally
    domain_path=domain_path,
  File "/home/nlpuser/.local/lib/python3.6/site-packages/rasax/community/local.py", line 234, in main
    sql_migrations.run_migrations(session)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/rasax/community/sql_migrations.py", line 25, in run_migrations
    _run_schema_migrations(session)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/rasax/community/sql_migrations.py", line 41, in _run_schema_migrations
    _run_alembic_migration(alembic_config)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/rasax/community/sql_migrations.py", line 65, in _run_alembic_migration
    command.upgrade(alembic_config, target_revision)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/command.py", line 298, in upgrade
    script.run_env()
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/script/base.py", line 489, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
    module = load_module_py(module_id, path)
  File "/home/nlpuser/.local/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 "/home/nlpuser/.local/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/env.py", line 96, in <module>
    run_migrations_online()
  File "/home/nlpuser/.local/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 "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/runtime/migration.py", line 522, in run_migrations
    step.migration_fn(**kw)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/rasax/community/database/schema_migrations/alembic/versions/migration_2021_06_09_make_workspace_id_index_partial_30ec36905354.py", line 32, in upgrade
    op.drop_index(INDEX_NAME)
  File "<string>", line 8, in drop_index
  File "<string>", line 3, in drop_index
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/operations/ops.py", line 1093, in drop_index
    return operations.invoke(op)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/operations/base.py", line 373, in invoke
    return fn(self, operation)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/operations/toimpl.py", line 94, in drop_index
    operation.to_index(operations.migration_context)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/ddl/impl.py", line 295, in drop_index
    self._exec(schema.DropIndex(index))
  File "/home/nlpuser/.local/lib/python3.6/site-packages/alembic/ddl/impl.py", line 141, in _exec
    return conn.execute(construct, *multiparams, **params)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1200, in execute
    return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/sql/ddl.py", line 78, in _execute_on_connection
    self, multiparams, params, execution_options
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1296, in _execute_ddl
    compiled,
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1749, in _execute_context
    e, statement, parameters, cursor, context
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1930, in _handle_dbapi_exception
    sqlalchemy_exception, with_traceback=exc_info[2], from_=e
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 198, in raise_
    raise exception
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1706, in _execute_context
    cursor, statement, parameters, context
  File "/home/nlpuser/.local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such index: msg_log_workspace_id_idx
[SQL:
DROP INDEX msg_log_workspace_id_idx]
(Background on this error at: http://sqlalche.me/e/14/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: http://forum.rasa.com/.

@vaidehi can you downgrade the rasa x version to 0.39.3 while seeing the above thread RASA X not working Locally - #50 by nik202

when I start rasa x inside docker container I got same error. how to resolved this error.

@shriyu share that error?