AttributeError: 'dict' object has no attribute 'predict_proba'

from typing import Text, List, Dict, Any from rasa_sdk import Action, Tracker from rasa_sdk.executor import CollectingDispatcher

class ActionHelloWorld(Action):

def name(self) -> Text:
    return "action_hello_world"

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
    
    return []

Ishue: AttributeError: ‘dict’ object has no attribute ‘predict_proba’

Libs: absl-py==0.9.0 aiofiles==0.4.0 aiohttp==3.5.4 alembic==1.0.11 APScheduler==3.6.0 astor==0.8.1 async-generator==1.10 async-timeout==3.0.1 attrs==19.1.0 blis==0.4.1 boto3==1.9.146 botocore==1.12.253 bz2file==0.98 cachetools==4.0.0 catalogue==1.0.0 certifi==2019.11.28 cffi==1.14.0 chardet==3.0.4 Click==7.0 cloudpickle==1.2.2 colorclass==2.2.0 coloredlogs==10.0 colorhash==1.0.2 ConfigArgParse==1.0 cryptography==2.8 cycler==0.10.0 cymem==2.0.3 decorator==4.4.1 dill==0.3.1.1 dnspython==1.16.0 docopt==0.6.2 docutils==0.15.2 dopamine-rl==3.0.1 engineering-notation==0.6.0 fbmessenger==6.0.0 Flask==1.1.1 future==0.18.2 gast==0.2.2 gevent==1.4.0 gin-config==0.3.0 gitdb2==3.0.2 GitPython==3.0.8 google-api-python-client==1.7.11 google-auth==1.11.2 google-auth-httplib2==0.0.3 google-pasta==0.1.8 googleapis-common-protos==1.51.0 greenlet==0.4.15 grpcio==1.27.2 gunicorn==20.0.4 gym==0.16.0 h11==0.8.1 h2==3.2.0 h5py==2.10.0 hpack==3.0.0 httpcore==0.3.0 httplib2==0.17.0 httptools==0.1.1 humanfriendly==7.1.1 hyperframe==5.2.0 idna==2.8 importlib-metadata==1.5.0 isodate==0.6.0 itsdangerous==1.1.0 Jinja2==2.11.1 jmespath==0.9.4 jsonpickle==1.1 jsonschema==3.0.2 kafka-python==1.4.7 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.0 kfac==0.2.0 kiwisolver==1.1.0 Mako==1.1.1 Markdown==3.2.1 MarkupSafe==1.1.1 matplotlib==3.0.3 mattermostwrapper==2.2 mesh-tensorflow==0.1.10 mpmath==1.1.0 multidict==4.6.1 murmurhash==1.0.2 networkx==2.4 numpy==1.16.3 oauth2client==4.1.3 opencv-python==4.2.0.32 opt-einsum==3.1.0 packaging==19.0 pika==1.0.1 Pillow==7.0.0 plac==1.1.3 preshed==3.0.2 promise==2.3 prompt-toolkit==2.0.10 protobuf==3.11.3 psycopg2-binary==2.8.2 pt-core-news-sm==2.2.5 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycparser==2.19 pydot==1.4.1 pyglet==1.5.0 PyJWT==1.7.1 pykwalify==1.7.0 pymongo==3.8.0 pyparsing==2.4.6 pypng==0.0.20 pyrsistent==0.15.7 PySocks==1.7.1 python-crfsuite==0.9.6 python-dateutil==2.8.0 python-editor==1.0.4 python-engineio==3.9.3 python-socketio==4.3.1 python-telegram-bot==11.1.0 pytz==2019.1 PyYAML==5.3 questionary==1.1.1 rasa==1.7.0 rasa-sdk==1.7.0 rasa-x==0.25.2 redis==3.3.5 requests==2.22.0 requests-async==0.5.0 requests-toolbelt==0.9.1 rfc3986==1.3.2 rocketchat-API==0.6.31 rsa==4.0 ruamel.yaml==0.15.94 s3transfer==0.2.1 sanic==19.9.0 Sanic-Cors==0.9.9.post1 sanic-jwt==1.3.2 Sanic-Plugins-Framework==0.8.2 scikit-learn==0.20.2 scipy==1.2.1 six==1.14.0 sklearn-crfsuite==0.3.6 slackclient==1.3.1 smmap2==2.0.5 spacy==2.2.3 SQLAlchemy==1.3.13 srsly==1.0.1 sympy==1.5.1 tabulate==0.8.6 tensor2tensor==1.14.0 tensorboard==1.15.0 tensorflow-cpu==1.15.0 tensorflow-datasets==2.0.0 tensorflow-estimator==1.15.1 tensorflow-gan==2.0.0 tensorflow-hub==0.7.0 tensorflow-metadata==0.21.1 tensorflow-probability==0.7.0 termcolor==1.1.0 terminaltables==3.1.0 thinc==7.3.1 tk-tools==0.12.0 tqdm==4.31.0 twilio==6.26.3 tzlocal==2.0.0 ujson==1.35 uritemplate==3.0.1 urllib3==1.25.8 uvloop==0.14.0 wasabi==0.6.0 wcwidth==0.1.8 webexteamssdk==1.1.1 websocket-client==0.54.0 websockets==8.1 Werkzeug==1.0.0 wrapt==1.12.0 yarl==1.4.2 zipp==3.0.0

I try all versions, Windows/Ubuntu and a virtualenv. Nothing works!

hi @joicepreuss - what command are you running that makes this error show up? is it rasa run actions ?

Rasa show this when I put the first message. I run with rasa run actions and rasa shell or rasa x.

ok yes definitely seems like your installation is broken then. Can you try creating a fresh virtual environment and installing in there?

Already did that :pensive:

ok, it could be that you have a global install lying aroudn somewhere. Can you try running which rasa and also python -c "import rasa;print(rasa.__file__)" and see if the paths look right? Maybe try deleting the rasa install manually from the filesystem and reinstalling

Hi, I made a new environment yesterday and now works <3 Thanks for your helping