question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rasa shell error: TypeError: argument of type 'NoneType' is not iterable

See original GitHub issue

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):

Exception occurred in one of response middleware handlers
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/sanic/app.py", line 985, in handle_request
    request, response
  File "/usr/local/lib/python3.6/site-packages/spf/framework.py", line 579, in _run_response_middleware
    _response = await _response
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/extension.py", line 267, in unapplied_cors_response_middleware
    set_cors_headers(req, resp, context, res_options)
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 254, in set_cors_headers
    headers_to_set = get_cors_headers(options, req.headers, req.method)
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 174, in get_cors_headers
    origins_to_set = get_cors_origins(options, request_headers.get('Origin'))
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in get_cors_origins
    return sorted([o for o in origins if not probably_regex(o)])
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 149, in <listcomp>
    return sorted([o for o in origins if not probably_regex(o)])
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in probably_regex
    return any((c in maybe_regex for c in common_regex_chars))
  File "/usr/local/lib/python3.6/site-packages/sanic_cors/core.py", line 273, in <genexpr>
    return any((c in maybe_regex for c in common_regex_chars))
TypeError: argument of type 'NoneType' is not iterable

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:35 (11 by maintainers)

github_iconTop GitHub Comments

7reactions
Phirefly9commented, Oct 2, 2019

adding --cors '*' to your arguments should fix it, it does for me

6reactions
wochingecommented, Oct 8, 2019

fixing it now

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: argument of type 'NoneType' is not iterable
while i train my model it give me Error:TypeError: argument of type 'NoneType' is not iterable. my rasa version is :1.10.3.
Read more >
RASA FORMS - 'NoneType' object is not iterable
For now, all I am trying to do is to print the file name to check if it is correctly extracting the value...
Read more >
How do I fix an "'int' object is not iterable" error? - Codecademy
The error is that here, you need to use i to iterate through a list, but you specified an integer, namely len(sequence) ,...
Read more >
CHANGELOG.mdx · Gitee 极速下载/rasa - Gitee.com
Fixed `argument of type 'NoneType' is not iterable` when using `rasa shell`,. `rasa interactive` / `rasa run`. ## [1.3.8] - 2019-10-08. ### Improvements....
Read more >
django django.core.exceptions.ImproperlyConfigured: Code Example
ImproperlyConfigured: Field name is not valid for model · django.core.exceptions. ... TypeError: argument of type 'LazyCorpusLoader' is not iterable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found