RasaHQ / financial-demo

A demo for a financial services bot
Apache License 2.0
309 stars 398 forks source link

Rasa train issue #159

Closed Manoj1229 closed 3 years ago

Manoj1229 commented 3 years ago

Getting an issue onrasa train

Traceback (most recent call last):
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\Scripts\rasa.exe\__main__.py", line 7, in <module>
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\rasa\__main__.py", line 117, in main
    cmdline_arguments.func(cmdline_arguments)
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\rasa\cli\train.py", line 59, in <lambda>
    train_parser.set_defaults(func=lambda args: run_training(args, can_exit=True))
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\rasa\cli\train.py", line 91, in run_training
    training_result = train_all(
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\rasa\api.py", line 106, in train
    from rasa.model_training import train_async
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\rasa\model_training.py", line 39, in <module>
    from rasa.core.agent import Agent
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\rasa\core\agent.py", line 16, in <module>
    from rasa.core.channels.channel import OutputChannel, UserMessage
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\rasa\core\channels\__init__.py", line 23, in <module>
    from rasa.core.channels.twilio import TwilioInput  # noqa: F401
  File "C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\rasa\core\channels\twilio.py", line 5, in <module>
    from twilio.base.exceptions import TwilioRestException
ModuleNotFoundError: No module named 'twilio.base'
hsm207 commented 3 years ago

What is the output of rasa --version and pip show twilio?

Manoj1229 commented 3 years ago

@hsm207 Here are the rasa --version and Twilio

Rasa Version

Rasa Version      :         2.8.2
Minimum Compatible Version: 2.8.0
Rasa SDK Version  :         2.8.1
Rasa X Version    :         0.42.0
Python Version    :         3.8.11
Operating System  :         Windows-10-10.0.19042-SP0

Twilio

Name: twilio
Version: 6.50.1
Summary: Twilio API client and TwiML generator
Home-page: https://github.com/twilio/twilio-python/
Author: Twilio
Author-email: help@twilio.com
License: UNKNOWN
Requires: six, pytz, requests, PyJWT
Required-by: rasa
hsm207 commented 3 years ago

What is the Location where the twilio package is installed?

e.g.

Name: twilio
Version: 6.50.1
Summary: Twilio API client and TwiML generator
Home-page: https://github.com/twilio/twilio-python/
Author: Twilio
Author-email: help@twilio.com
License: UNKNOWN
Location: /opt/venv/lib/python3.8/site-packages
Requires: PyJWT, pytz, six, requests
Required-by: rasa
Manoj1229 commented 3 years ago

Location: c:\users\A v1\anaconda3\envs\rasa\lib\site-packages

hsm207 commented 3 years ago

Do you get the same error when you train the bot using rasa init?

Manoj1229 commented 3 years ago

Do you get the same error when you train the bot using rasa init?

I didn't check with rasa init. Let me try and know you.

Manoj1229 commented 3 years ago

Do you get the same error when you train the bot using rasa init?

Yes @hsm207 getting the same Twilio issue

hsm207 commented 3 years ago

@Manoj1229 what is the output of:

python -c "from twilio.base import *; import sys; print(sys.path)"
Manoj1229 commented 3 years ago

python -c "from twilio.base import *; import sys; print(sys.path)"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'twilio.base'
hsm207 commented 3 years ago

What if you run:

python -c "import sys; print(sys.path)"
Manoj1229 commented 3 years ago

python -c "import sys; print(sys.path)"

['', 'C:\\Users\\AppsTek V1\\anaconda3\\envs\\rasa\\python38.zip', 'C:\\Users\\AppsTek V1\\anaconda3\\envs\\rasa\\DLLs', 'C:\\Users\\AppsTek V1\\anaconda3\\envs\\rasa\\lib', 'C:\\Users\\AppsTek V1\\anaconda3\\envs\\rasa', 'C:\\Users\\AppsTek V1\\AppData\\Roaming\\Python\\Python38\\site-packages', 'C:\\Users\\AppsTek V1\\anaconda3\\envs\\rasa\\lib\\site-packages']

hsm207 commented 3 years ago

I see you have installed twilio at c:\users\A v1\anaconda3\envs\rasa\lib\site-packages but that path is not in your sys.path.

Manoj1229 commented 3 years ago

I see you have installed twilio at c:\users\A v1\anaconda3\envs\rasa\lib\site-packages but that path is not in your sys.path.

Both are same, It my mistake typo here c:\users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages

Manoj1229 commented 3 years ago

I see you have installed twilio at c:\users\A v1\anaconda3\envs\rasa\lib\site-packages but that path is not in your sys.path.

Both are same, It my mistake typo here c:\users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages

Here the overview pip show Twilio:

Name: twilio
Version: 6.50.1
Summary: Twilio API client and TwiML generator
Home-page: https://github.com/twilio/twilio-python/
Author: Twilio
Author-email: help@twilio.com
License: UNKNOWN
Location: c:\users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages
Requires: PyJWT, requests, pytz, six
Required-by: rasa
hsm207 commented 3 years ago

Can you try running this command:

python -c "import twilio; print(twilio.__file__)"
Manoj1229 commented 3 years ago

python -c "import twilio; print(twilio.file)"

C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\twilio\__init__.py

hsm207 commented 3 years ago

python -c "import twilio; print(twilio.file)"

This is not the command I asked you to run. Was there a typo?

Anyway, what is the content of this folder?

C:\Users\AppsTek V1\anaconda3\envs\rasa\lib\site-packages\twilio

Manoj1229 commented 3 years ago

@hsm207 The Issue is solved! downgrade the Twilio version to 6.26