Rasa _rust module not found? I don't know that happened (NOT TO ANSWER)

I installed my packages to install in a new pipenv and dispay the following message

>rasa train
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\core\tracker_store.py:1044: MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
  Base: DeclarativeMeta = declarative_base()
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\validation.py:134: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\pkg_resources\__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\pkg_resources\__init__.py:2868: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('ruamel')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
2024-01-23 12:15:29 INFO     rasa.cli.train  - Started validating domain and training data...
2024-01-23 12:15:38 INFO     rasa.validator  - Validating intents...
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The intent 'mood_great' is not used in any story or rule.
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The intent 'mood_unhappy' is not used in any story or rule.
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The intent 'supply_email' is not used in any story or rule.
2024-01-23 12:15:38 INFO     rasa.validator  - Validating uniqueness of intents and stories...
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The example 'buenas noches' was found labeled with multiple different intents in the training data. Each annotated message should only appear with one intent. You should fix that conflict The example is labeled with: goodbye, greet.
2024-01-23 12:15:38 INFO     rasa.validator  - Validating utterances...
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The utterance 'utter_default' is not used in any story or rule.
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The utterance 'utter_product_provided' is not used in any story or rule.
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The utterance 'utter_ask_for_email' is not used in any story or rule.
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The utterance 'utter_cheer_up' is not used in any story or rule.
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The utterance 'utter_acknowledge_provided_info' is not used in any story or rule.
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\shared\utils\io.py:99: UserWarning: The utterance 'utter_happy' is not used in any story or rule.
2024-01-23 12:15:38 INFO     rasa.validator  - Story structure validation...
Processed story blocks: 100%|██████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 319.23it/s, # trackers=1]
2024-01-23 12:15:38 INFO     rasa.core.training.story_conflict  - Considering all preceding turns for conflict analysis.
2024-01-23 12:15:38 INFO     rasa.validator  - No story structure conflicts found.
Traceback (most recent call last):
  File "c:\users\diego\.pyenv\pyenv-win\versions\3.9.0\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\diego\.pyenv\pyenv-win\versions\3.9.0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\Scripts\rasa.exe\__main__.py", line 7, in <module>
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\__main__.py", line 133, in main
    cmdline_arguments.func(cmdline_arguments)
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\cli\train.py", line 61, in <lambda>
    train_parser.set_defaults(func=lambda args: run_training(args, can_exit=True))
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\cli\train.py", line 101, in run_training
    training_result = train_all(
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\api.py", line 103, in train
    from rasa.model_training import train
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\model_training.py", line 7, in <module>
    import rasa.engine.validation
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\engine\validation.py", line 33, in <module>
    from rasa.engine.constants import RESERVED_PLACEHOLDERS
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\engine\constants.py", line 3, in <module>
    from rasa.core.channels import UserMessage
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\core\channels\__init__.py", line 3, in <module>
    from rasa.core.channels.channel import (  # noqa: F401
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\core\channels\channel.py", line 4, in <module>
    import jwt
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\jwt\__init__.py", line 1, in <module>
    from .api_jwk import PyJWK, PyJWKSet
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\jwt\api_jwk.py", line 7, in <module>
    from .algorithms import get_default_algorithms, has_crypto, requires_cryptography
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\jwt\algorithms.py", line 12, in <module>
    from .utils import (
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\jwt\utils.py", line 7, in <module>
    from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\cryptography\hazmat\primitives\asymmetric\ec.py", line 11, in <module>
    from cryptography.hazmat._oid import ObjectIdentifier
  File "C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\cryptography\hazmat\_oid.py", line 7, in <module>
    from cryptography.hazmat.bindings._rust import (
ImportError: DLL load failed while importing _rust: The specified procedure could not be found.

requirements.txt

rasa==3.6.15
rasa-sdk==3.6.2
requests==2.31.0
transformers==4.37.0

Pipfile

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
rasa = "==3.6.15"
rasa-sdk = "==3.6.2"
requests = "==2.31.0"
transformers = "==4.37.0"

[dev-packages]

[requires]
python_version = "3.9"
python_full_version = "3.9.0"

Rasa version

>rasa --version
C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\lib\site-packages\rasa\core\tracker_store.py:1044: MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
  Base: DeclarativeMeta = declarative_base()
Rasa Version      :         3.6.15
Minimum Compatible Version: 3.5.0
Rasa SDK Version  :         3.6.2
Python Version    :         3.9.0
Operating System  :         Windows-10-10.0.22621-SP0
Python Path       :         C:\Users\diego\.virtualenvs\chatbot-YZ9B1I5Z\Scripts\python.exe

Did you know what is the cause of this error, please?

If you need more information, let me know.

UPDATED: Not to answer to this question. I found the way to fix it. Thank you.

Hi ,can you share what you did in order to solve this issue ? I’m getting the exact same error but I couldn’t fund anything online to solve it.

Hi @dhdez-blife , I’ve encountered a similar error while training my rasa chatbot too. Could you please share as to how you had fixed it? Thank you.

@idanzhavi09

I remembered to avoid to install in my venv from the Pipfile and not to update your requirements via from Pipfile.lock

I hope both can try it.

Grettings

@muzzammil

I remembered to avoid to install in my venv from the Pipfile and not to update your requirements via from Pipfile.lock

I hope both can try it.

Grettings

1 Like

Please install rasa using requirements.txt. Avoid using Pipfile.lock

1 Like

Please install rasa using requirements.txt. Avoid using Pipfile.lock