Closed osvald0 closed 5 years ago
I am having the same problem too It's also on the forms https://forum.rasa.com/t/rasa-shell-argument-of-type-nonetype-is-not-iterable/17672
Rasa: 1.3.6 (version inside the docker image) Python: 3.6.7 Windows 10 / running from Powershell Docker version 17.03.1-ce-rc1, build 3476dbf Docker image: rasa/rasa:latest-full
I just setup Rasa for docker yesterday (9/30) and when running
docker run -it -v ${PWD}:/app rasa/rasa shell
Whenever I type something and hit enter, I see what @osvald0 reports, followed by the correct utterances.
Then it gets a bit crazy. I setup a docker-compose.yml file like below to run the server
version: '3.0'
services:
rasa:
image: rasa/rasa:latest-full
ports:
- 5005:5005
volumes:
- ./:/app
command:
- run
and once I run docker-compose up
the server starts, and about 8 seconds later scrolls the following constantly and have to CTRL+C out of it. The error dump is what @osvald0 is getting above, but there is also another block about the /version url.
I don't have anything else running that I know of.
Exception occurred while handling uri: 'http://localhost:5005/version'
rasa_1 | Traceback (most recent call last):
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 920, in handle_request
rasa_1 | handler, args, kwargs, uri = self.router.get(request)
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic/router.py", line 407, in get
rasa_1 | return self._get(request.path, request.method, "")
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic/router.py", line 470, in _get
rasa_1 | raise NotFound("Requested URL {} not found".format(url))
rasa_1 | sanic.exceptions.NotFound: Requested URL /version not found
rasa_1 | Exception occurred in one of response middleware handlers
rasa_1 | Traceback (most recent call last):
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 985, in handle_request
rasa_1 | request, response
rasa_1 | File "/usr/local/lib/python3.6/site-packages/spf/framework.py", line 579, in _run_response_middleware
rasa_1 | _response = await _response
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic_cors/extension.py", line 267, in unapplied_cors_response_middleware
rasa_1 | set_cors_headers(req, resp, context, res_options)
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 254, in set_cors_headers
rasa_1 | headers_to_set = get_cors_headers(options, req.headers, req.method)
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 174, in get_cors_headers
rasa_1 | origins_to_set = get_cors_origins(options, request_headers.get('Origin'))
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in get_cors_origins
rasa_1 | return sorted([o for o in origins if not probably_regex(o)])
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in <listcomp>
rasa_1 | return sorted([o for o in origins if not probably_regex(o)])
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in probably_regex
rasa_1 | return any((c in maybe_regex for c in common_regex_chars))
rasa_1 | File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in <genexpr>
rasa_1 | return any((c in maybe_regex for c in common_regex_chars))
rasa_1 | TypeError: argument of type 'NoneType' is not iterable
Seems like it may be a bug in the latest version of Rasa.
As a followup, I have a bot I've been working on one that is a on an older version of Rasa 1.2.5 and don't have any errors with that one.
I also have the same problem
Where can I download a previous version of RASA?
As well I have the same problem :( after upgrade.
I just tried to reproduce this but couldn't - what versions of sanic are you on @osvald0 ? Would be good to see a pip list
. And for all of you does this happen locally or on docker?
locally
@akelad, I also have the same issue using:
And here is my pip list
(virtual environment)
Package Version Location
------------------------ ---------- --------------------------------------------------
absl-py 0.8.0
aiofiles 0.4.0
aiohttp 3.5.4
APScheduler 3.6.0
asn1crypto 0.24.0
astor 0.8.0
async-generator 1.10
async-timeout 3.0.1
attrs 19.1.0
blis 0.2.4
boto3 1.9.146
botocore 1.12.238
bz2file 0.98
cachetools 3.1.1
certifi 2019.9.11
cffi 1.12.3
chardet 3.0.4
Click 7.0
cloudpickle 1.2.2
colorclass 2.2.0
coloredlogs 10.0
colorhash 1.0.2
ConfigArgParse 0.14.0
cryptography 2.7
cycler 0.10.0
cymem 2.0.2
decorator 4.4.0
dill 0.3.1.1
dnspython 1.16.0
docopt 0.6.2
docutils 0.15.2
dopamine-rl 2.0.5
en-core-web-md 2.1.0
fbmessenger 6.0.0
Flask 1.1.1
Flask-Cors 3.0.8
future 0.17.1
gast 0.2.2
gevent 1.4.0
gin-config 0.2.1
google-api-python-client 1.7.11
google-auth 1.6.3
google-auth-httplib2 0.0.3
google-pasta 0.1.7
googleapis-common-protos 1.6.0
greenlet 0.4.15
grpcio 1.24.0
gunicorn 19.9.0
gym 0.14.0
h5py 2.10.0
httplib2 0.14.0
httptools 0.0.13
humanfriendly 4.18
idna 2.8
idna-ssl 1.1.0
itsdangerous 1.1.0
jieba 0.39
Jinja2 2.10.1
jmespath 0.9.4
jsonpickle 1.1
jsonschema 2.6.0
kafka-python 1.4.6
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kfac 0.2.0
kiwisolver 1.1.0
Markdown 3.1.1
MarkupSafe 1.1.1
matplotlib 3.0.3
mattermostwrapper 2.1
mesh-tensorflow 0.0.5
mitie 0.7.0
mpmath 1.1.0
multidict 4.5.2
murmurhash 1.0.2
networkx 2.3
numpy 1.16.3
oauth2client 4.1.3
opencv-python 4.1.1.26
packaging 19.0
pika 1.0.1
Pillow 6.1.0
pip 19.2.3
pkg-resources 0.0.0
plac 0.9.6
preshed 2.0.1
promise 2.2.1
prompt-toolkit 2.0.9
protobuf 3.9.2
psutil 5.6.3
psycopg2-binary 2.8.2
pyasn1 0.4.7
pyasn1-modules 0.2.6
pycparser 2.19
pydot 1.4.1
pyglet 1.3.2
PyJWT 1.7.1
pykwalify 1.7.0
pymongo 3.8.0
pyparsing 2.4.2
pypng 0.0.20
PySocks 1.7.1
python-crfsuite 0.9.6
python-dateutil 2.8.0
python-engineio 3.9.3
python-socketio 4.3.1
python-telegram-bot 11.1.0
pytz 2019.1
PyYAML 5.1.2
questionary 1.1.1
rasa 1.3.6 /media/anwar/E/Chatbot/RASA/py3env/sourceCode/rasa
rasa-sdk 1.3.3
redis 3.3.5
requests 2.22.0
requests-toolbelt 0.9.1
rocketchat-API 0.6.31
rsa 4.0
ruamel.yaml 0.15.94
s3transfer 0.2.1
sanic 19.3.1
Sanic-Cors 0.9.8
sanic-jwt 1.3.1
Sanic-Plugins-Framework 0.8.2
scikit-learn 0.20.2
scipy 1.2.1
setuptools 41.2.0
simplejson 3.16.0
six 1.12.0
sklearn-crfsuite 0.3.6
slackclient 1.3.1
spacy 2.1.4
SQLAlchemy 1.3.8
srsly 0.1.0
sympy 1.4
tabulate 0.8.5
tensor2tensor 1.14.0
tensorboard 1.14.0
tensorflow 1.14.0
tensorflow-datasets 1.2.0
tensorflow-estimator 1.14.0
tensorflow-gan 1.0.0.dev0
tensorflow-metadata 0.14.0
tensorflow-probability 0.7.0
termcolor 1.1.0
terminaltables 3.1.0
thinc 7.0.8
tqdm 4.31.0
twilio 6.26.3
typing-extensions 3.7.4
tzlocal 2.0.0
ujson 1.35
uritemplate 3.0.0
urllib3 1.25.6
uvloop 0.13.0
wasabi 0.2.2
wcwidth 0.1.7
webexteamssdk 1.1.1
websocket-client 0.54.0
websockets 6.0
Werkzeug 0.16.0
wheel 0.33.6
wrapt 1.11.2
yarl 1.3.0
This problem disappears when I use Rasa 1.3.3
. Here is exactly what I did to install Rasa 1.3.3:
virtualenv
with python 3.6.5
.@teresalazar13, hope this can help
Same problem here with Python 3.7.4 and rasa from master branch (commit e11643ea7786dec5efeceb2f0a788cc34443df64)
I just downgraded rasa from 1.3.7 to 1.3.3 and the error had disappeared. pip3 uninstall rasa pip3 install rasa==1.3.3
Thank you @Anwarvic ! I ended up downgrading from 1.3.7 to 1.3.3 with "pip install rasa=1.3.3" and it worked.
adding --cors '*'
to your arguments should fix it, it does for me
@akelad
And for all of you does this happen locally or on docker?
I'm using docker. I explained above that it happens with
docker run -it -v ${PWD}:/app rasa/rasa shell
<--- happens after I hit enter to send my response
as well as
docker-compose up
<--- way worse and scrolls the error over and over, does not stop
adding --cors '*' definitely Help! :)
That worked for me as well with both shell
and run
commands with docker.
Rasa shell
docker run -it -v ${PWD}:/app rasa/rasa shell --cors "*"
and for running the entire server:
Rasa run
docker run -it -v ${PWD}:/app rasa/rasa run --enable-api --log-file out.log --cors "*"
@msamogh i believe you also ran into this? Did you find a workaround for it other than the --cors
command?
Adding --cors '*'
does not work for rasa interactive
, where the same problem occurs.
rasa interactive
is also broken
fixing it now
@wochinge has this whole issue been fixed now or just the interactive
?
the whole thing
Wow! Nothing is working. I think I'll just train my own model. Moving on.
@MikeyBeez Hey, what problem are you running into and how can I help you?
I am also facing the same issue and downgrading is not an option as rasa X will not otherwise.
(rasa_env) E:\Work\AI_And_Iot\CHAT BOTS\RASA\restorent_test_chat_bot>rasa train 2020-09-22 10:12:53 INFO rasa.model - Data (messages) for NLU model section changed. Core stories/configuration did not change. No need to retrain Core model. Training NLU model... Traceback (most recent call last): File "c:\users\nares\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\nares\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "E:\Work\AI_And_Iot\CHAT BOTS\RASA\rasa_env\Scripts\rasa.exe\__main__.py", line 7, in <module> File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\__main__.py", line 92, in main cmdline_arguments.func(cmdline_arguments) File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\cli\train.py", line 76, in train additional_arguments=extract_additional_arguments(args), File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\train.py", line 50, in train additional_arguments=additional_arguments, File "c:\users\nares\appdata\local\programs\python\python36\lib\asyncio\base_events.py", line 484, in run_until_complete return future.result() File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\train.py", line 101, in train_async additional_arguments, File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\train.py", line 188, in _train_async_internal additional_arguments=additional_arguments, File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\train.py", line 245, in _do_training persist_nlu_training_data=persist_nlu_training_data, File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\train.py", line 482, in _train_nlu_with_validated_data persist_nlu_training_data=persist_nlu_training_data, File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\nlu\train.py", line 75, in train trainer = Trainer(nlu_config, component_builder) File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\nlu\model.py", line 142, in __init__ components.validate_requirements(cfg.component_names) File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\nlu\components.py", line 51, in validate_requirements component_class = registry.get_component_class(component_name) File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\nlu\registry.py", line 173, in get_component_class return class_from_module_path(component_name) File "e:\work\ai_and_iot\chat bots\rasa\rasa_env\lib\site-packages\rasa\utils\common.py", line 208, in class_from_module_path if "." in module_path: TypeError: argument of type 'NoneType' is not iterable
RASA VERSIONS ARE:
rasa 1.10.12 rasa-sdk 1.10.2 rasa-x 0.32.2 redis 3.5.3 regex 2020.6.8 requests 2.24.0 requests-oauthlib 1.3.0 requests-toolbelt 0.9.1 rfc3986 1.4.0 rocketchat-API 0.6.36 rsa 4.6 ruamel.yaml 0.16.12 ruamel.yaml.clib 0.2.0 s3transfer 0.3.3 sacremoses 0.0.43 sanic 19.12.2 Sanic-Cors 0.10.0.post3 sanic-jwt 1.3.2
tensorboard 2.1.1 tensorflow 2.1.1 tensorflow-addons 0.7.1 tensorflow-estimator 2.1.0 tensorflow-hub 0.7.0 tensorflow-probability 0.7.0 termcolor 1.1.0
@wochinge I am also getting the same problem , Python - 33.6.8
Rasa Version : 2.0.0
Rasa SDK Version : 2.0.0
Rasa X Version : None
Python Version : 3.6.8
Operating System : Windows-10-10.0.18362-SP0
pip list Package Version
absl-py 0.10.0 aiofiles 0.6.0 aiohttp 3.6.3 APScheduler 3.6.3 astunparse 1.6.3 async-generator 1.10 async-timeout 3.0.1 attrs 20.2.0 boto3 1.16.13 botocore 1.19.13 cachetools 4.1.1 certifi 2020.11.8 cffi 1.14.3 chardet 3.0.4 cloudpickle 1.4.1 colorama 0.4.4 colorclass 2.2.0 coloredlogs 14.0 colorhash 1.0.2 contextvars 2.4 cryptography 3.2.1 cycler 0.10.0 decorator 4.4.2 dm-tree 0.1.5 dnspython 1.16.0 docopt 0.6.2 fbmessenger 6.0.0 future 0.18.2 gast 0.4.0 google-auth 1.23.0 google-auth-oauthlib 0.4.2 google-pasta 0.2.0 grpcio 1.33.2 h11 0.8.1 h2 3.2.0 h5py 2.10.0 hpack 3.0.0 hstspreload 2020.10.20 httpcore 0.11.1 httplib2 0.18.1 httptools 0.1.1 httpx 0.9.3 humanfriendly 8.2 hyperframe 5.2.0 idna 2.10 idna-ssl 1.1.0 immutables 0.14 importlib-metadata 2.0.0 jmespath 0.10.0 joblib 0.15.1 jsonpickle 1.4.1 jsonschema 3.2.0 kafka-python 2.0.2 Keras-Preprocessing 1.1.2 kiwisolver 1.3.1 Markdown 3.3.3 matplotlib 3.3.2 mattermostwrapper 2.2 multidict 4.6.0 networkx 2.5 numpy 1.19.4 oauth2client 4.1.3 oauthlib 3.1.0 opt-einsum 3.3.0 packaging 20.4 pika 1.1.0 Pillow 8.0.1 pip 20.2.4 prompt-toolkit 2.0.10 protobuf 3.13.0 psycopg2-binary 2.8.6 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycparser 2.20 pydot 1.4.1 PyJWT 1.7.1 pykwalify 1.7.0 pymongo 3.10.1 pyparsing 2.4.7 pyreadline 2.1 pyrsistent 0.17.3 python-crfsuite 0.9.7 python-dateutil 2.8.1 python-engineio 3.13.2 python-socketio 4.6.0 python-telegram-bot 12.8 pytz 2020.4 PyYAML 5.3.1 questionary 1.5.2 rasa 2.0.0 rasa-sdk 2.0.0 redis 3.5.3 regex 2020.9.27 requests 2.24.0 requests-oauthlib 1.3.0 requests-toolbelt 0.9.1 rfc3986 1.4.0 rocketchat-API 1.9.1 rsa 4.6 ruamel.yaml 0.16.12 ruamel.yaml.clib 0.2.2 s3transfer 0.3.3 sanic 19.12.2 Sanic-Cors 0.10.0.post3 sanic-jwt 1.4.1 Sanic-Plugins-Framework 0.9.4.post1 scikit-learn 0.23.2 scipy 1.5.4 sentry-sdk 0.17.8 setuptools 50.3.2 six 1.15.0 sklearn-crfsuite 0.3.6 slackclient 2.9.3 sniffio 1.2.0 SQLAlchemy 1.3.20 tabulate 0.8.7 tensorboard 2.3.0 tensorboard-plugin-wit 1.7.0 tensorflow 2.3.1 tensorflow-addons 0.11.2 tensorflow-estimator 2.3.0 tensorflow-hub 0.9.0 tensorflow-probability 0.11.1 termcolor 1.1.0 terminaltables 3.1.0 threadpoolctl 2.1.0 tornado 6.1 tqdm 4.50.2 twilio 6.45.4 typeguard 2.10.0 typing-extensions 3.7.4.3 tzlocal 2.1 ujson 3.2.0 urllib3 1.25.11 wcwidth 0.2.5 webexteamssdk 1.6 websockets 8.1 Werkzeug 1.0.1 wheel 0.35.1 wrapt 1.12.1 yarl 1.5.1 zipp 3.4.0
please fix this I need to submit my assignments.
Are you using any custom components classes which you're loading by module path?
I think it would best create a new GitHub issue as this seems to be a different issue @nareshmungpara @najimali
Are you using any custom components classes which you're loading by module path?
Now i am not getting this problem, I deleted my %temp% folder & started from the scratch,
Running fine in python 3.6.8 & rasa 2.0 & using freshly create virtual environment.
@najimali can you please tell me how can I do this
rasa2.0.2 how can i integrate telegram
(rasaenv) C:\Users\HCL\PycharmProjects\rasa>rasa run
Traceback (most recent call last):
File "C:\Users\HCL\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\HCL\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\HCL\PycharmProjects\rasa\rasaenv\Scripts\rasa.exe__main.py", line 7, in
I have not done it yet connection of telegram part, you can refer Youtube channel - innovate yourself
this problem is occuring because of some logic error in your domain or stories file.
@najimali which video bro there are lot of videos
Rasa version: 1.3.6
Python version: 3.6.9
Operating system (windows, osx, ...): rsa/rasa docker image
Issue: When I'm using the shell and send a message, the following error is displayed. The correct response is displayed after the error but I get the exception.
Error (including full traceback):
Thanks!