paulpierre / RasaGPT

💬 RasaGPT is the first headless LLM chatbot platform built on top of Rasa and Langchain. Built w/ Rasa, FastAPI, Langchain, LlamaIndex, SQLModel, pgvector, ngrok, telegram
https://rasagpt.dev
MIT License
2.36k stars 227 forks source link

Permission errors while creating .config and reading config.yml #67

Open agoodfellow123 opened 10 months ago

agoodfellow123 commented 10 months ago
/opt/venv/lib/python3.10/site-packages/rasa/core/tracker_store.py:1042: 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()
2024-01-13 12:21:36 WARNING  rasa.utils.common  - Failed to write global config. Error: [Errno 13] Permission denied: '/app/.config'. Skipping.
/opt/venv/lib/python3.10/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
  warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
/opt/venv/lib/python3.10/site-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
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)
/opt/venv/lib/python3.10/site-packages/pkg_resources/__init__.py:2870: 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)
/opt/venv/lib/python3.10/site-packages/pkg_resources/__init__.py:2870: 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)
/opt/venv/lib/python3.10/site-packages/pkg_resources/__init__.py:2870: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('ruamel.yaml')`.
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-13 12:21:36 INFO     rasa.cli.train  - Started validating domain and training data...
/opt/venv/lib/python3.10/site-packages/tensorflow/python/framework/dtypes.py:246: DeprecationWarning: `np.bool8` is a deprecated alias for `np.bool_`.  (Deprecated NumPy 1.24)
  np.bool8: (False, True),
2024-01-13 12:21:40 INFO     rasa.validator  - Validating intents...
2024-01-13 12:21:40 INFO     rasa.validator  - Validating uniqueness of intents and stories...
2024-01-13 12:21:40 INFO     rasa.validator  - Validating utterances...
2024-01-13 12:21:40 INFO     rasa.validator  - Story structure validation...
Processed story blocks: 100%|█| 1/1 [00:00<00:00, 4198.50it/s, # tracker
2024-01-13 12:21:40 INFO     rasa.core.training.story_conflict  - Considering all preceding turns for conflict analysis.
2024-01-13 12:21:40 INFO     rasa.validator  - No story structure conflicts found.
2024-01-13 12:21:40 WARNING  rasa.utils.common  - Failed to write global config. Error: [Errno 13] Permission denied: '/app/.config'. Skipping.
Traceback (most recent call last):
  File "/opt/venv/bin/rasa", line 8, in <module>
    sys.exit(main())
  File "/opt/venv/lib/python3.10/site-packages/rasa/__main__.py", line 133, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/opt/venv/lib/python3.10/site-packages/rasa/cli/train.py", line 61, in <lambda>
    train_parser.set_defaults(func=lambda args: run_training(args, can_exit=True))
  File "/opt/venv/lib/python3.10/site-packages/rasa/cli/train.py", line 101, in run_training
    training_result = train_all(
  File "/opt/venv/lib/python3.10/site-packages/rasa/api.py", line 105, in train
    return train(
  File "/opt/venv/lib/python3.10/site-packages/rasa/model_training.py", line 207, in train
    return _train_graph(
  File "/opt/venv/lib/python3.10/site-packages/rasa/model_training.py", line 249, in _train_graph
    config, _missing_keys, _configured_keys = recipe.auto_configure(
  File "/opt/venv/lib/python3.10/site-packages/rasa/engine/recipes/default_recipe.py", line 963, in auto_configure
    DefaultV1Recipe._dump_config(
  File "/opt/venv/lib/python3.10/site-packages/rasa/engine/recipes/default_recipe.py", line 1071, in _dump_config
    DefaultV1Recipe._add_missing_config_keys_to_file(config_file_path, missing_keys)
  File "/opt/venv/lib/python3.10/site-packages/rasa/engine/recipes/default_recipe.py", line 1123, in _add_missing_config_keys_to_file
    with open(
PermissionError: [Errno 13] Permission denied: 'config.yml'
make[1]: *** [Makefile:291: rasa-train] Error 1
make[1]: Leaving directory '/home/user/Projects/RasaGPT'
make: *** [Makefile:57: install] Error 2

Key points:

agoodfellow123 commented 10 months ago

Solved, run chmod -R 777 . on the root folder of the project.

However, I've hit a new wall:

Building models in Postgres ..\n
wait-for-it.sh: waiting 60 seconds for db:5432 to be available (tcp)
wait-for-it.sh: timeout occurred after waiting 60 seconds for db:5432
INFO:config:...Enabling pgvector and creating database tables
...Enabling pgvector and creating database tables
Traceback (most recent call last):
  File "/app/api/models.py", line 660, in <module>
    create_db()
  File "/app/api/models.py", line 586, in create_db
    enable_vector()
  File "/app/api/models.py", line 619, in enable_vector
    session.execute(query)
  File "/usr/local/lib/python3.9/site-packages/sqlmodel/orm/session.py", line 129, in execute
    return super().execute(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2308, in execute
    return self._execute_internal(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2088, in _execute_internal
    statement = coercions.expect(roles.StatementRole, statement)
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 413, in expect
    resolved = impl._literal_coercion(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 638, in _literal_coercion
    return self._text_coercion(element, argname, **kw)
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 631, in _text_coercion
    return _no_text_coercion(element, argname)
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 601, in _no_text_coercion
    raise exc_cls(
sqlalchemy.exc.ArgumentError: Textual SQL expression 'CREATE EXTENSION IF NOT E...' should be explicitly declared as text('CREATE EXTENSION IF NOT E...')
make[1]: *** [Makefile:199: models] Error 1
make[1]: Leaving directory '/home/user/Projects/RasaGPT'
make: *** [Makefile:60: install] Error 2
whitedogedev commented 10 months ago

hi! meet the same error as yours. Did you solve this?

Traceback (most recent call last):
  File "/app/api/models.py", line 660, in <module>
    create_db()
  File "/app/api/models.py", line 586, in create_db
    enable_vector()
  File "/app/api/models.py", line 619, in enable_vector
    session.execute(query)
  File "/usr/local/lib/python3.9/site-packages/sqlmodel/orm/session.py", line 129, in execute
    return super().execute(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2308, in execute
    return self._execute_internal(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2088, in _execute_internal
    statement = coercions.expect(roles.StatementRole, statement)
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 413, in expect
    resolved = impl._literal_coercion(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 638, in _literal_coercion
    return self._text_coercion(element, argname, **kw)
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 631, in _text_coercion
    return _no_text_coercion(element, argname)
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/coercions.py", line 601, in _no_text_coercion
    raise exc_cls(
sqlalchemy.exc.ArgumentError: Textual SQL expression 'CREATE EXTENSION IF NOT E...' should be explicitly declared as text('CREATE EXTENSION IF NOT E...')
make[1]: *** [models] Error 1
make: *** [install] Error 2