Rasa Compatibility Issues

Comp Info: -Windows 10 Home -64x

Issue: When I get to the stage where I initiate rasa, I am getting errors regarding the compatibility of tensorflow. I have tried using many different versions of rasa and the pre-requisite apps per rasa version. I am currently trying to use rasa 1.9.1 and I am getting errors. My brain hurts at this point so I am butchering this post, so I apologize.

Some of the errors I have received:

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

AttributeError: module ‘tensorflow.python.keras.api._v1.keras.utils’ has no attribute ‘register_keras_serializable’

rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy ‘MemoizationPolicy’ could not be loaded. Please make sure the name is a valid policy.

Finally: Again, I am sorry none of this makes sense. Hopefully, someone can help guide me through this process.

Hi @john.mcquaid, would you be able to post the full stacktrace of the errors you are receiving, as well as the commands you ran that caused these errors?

Hello @akelad,

I cannot post, all at once, the stack trace of errors I have received as most of them occur based on the installed applications’ version. I have hammered out most of the errors and I am now at point where I cannot get passed the compatibility issues tensorflow (at least I believe tensorflow is the problem) has with rasa. I have tried changing rasa’s versions as well as tensorflow’s versions to find versions that are compatible. Currently, I am using Rasa 1.9.1 and I have not been able to find a version of tensorflow that works. Below is the stack trace of the error I am receiving with the current version of rasa. Keep in mind, I have followed step by step as per the Installation Video all the way up to the rasa init command.

Side Note - I have gone all the way through this same video, last week on another computer, and I did not have a single error.

could you share the output of pip freeze? And yeah, unfortunately Windows has a lot of issues with tensorflow :sweat:

(base) c:\Rasa>conda activate rasainstallation

(rasainstallation) c:\Rasa>pip freeze
absl-py==0.9.0
aiofiles==0.6.0
aiohttp @ file:///C:/ci/aiohttp_1602530358780/work
APScheduler==3.6.3
astor==0.8.1
astunparse==1.6.3
async-generator==1.10
async-timeout==3.0.1
attrs==19.3.0
blinker==1.4
boto3==1.16.14
botocore==1.19.14
brotlipy==0.7.0
cachetools @ file:///tmp/build/80754af9/cachetools_1596822027882/work
certifi==2020.6.20
cffi @ file:///C:/ci/cffi_1600699250966/work
chardet==3.0.4
click==7.1.2
cloudpickle==1.2.2
colorama==0.4.4
colorclass==2.2.0
coloredlogs==10.0
colorhash==1.0.2
cryptography @ file:///C:/ci/cryptography_1601046913206/work
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.3.3
gevent==1.4.0
google-auth @ file:///tmp/build/80754af9/google-auth_1604100403705/work
google-auth-oauthlib @ file:///tmp/build/80754af9/google-auth-oauthlib_1603929124518/work
google-pasta==0.2.0
greenlet==0.4.17
grpcio @ file:///C:/ci/grpcio_1597406403308/work
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 @ file:///tmp/build/80754af9/idna_1593446292537/work
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1602276842396/work
jmespath==0.10.0
joblib==0.15.1
jsonpickle==1.3
jsonschema==3.2.0
kafka-python==1.4.7
Keras==2.3.1
Keras-Applications @ file:///tmp/build/80754af9/keras-applications_1594366238411/work
Keras-Preprocessing==1.1.2
kiwisolver==1.3.1
Markdown @ file:///C:/ci/markdown_1603216569530/work
matplotlib==3.1.3
mattermostwrapper==2.2
mkl-fft==1.2.0
mkl-random==1.1.1
mkl-service==2.3.0
multidict @ file:///C:/ci/multidict_1600456486794/work
networkx==2.4
numpy==1.18.5
oauth2client==4.1.3
oauthlib==3.1.0
opt-einsum==3.1.0
packaging==19.0
pika==1.1.0
Pillow==8.0.1
prompt-toolkit==2.0.10
protobuf==3.13.0
psycopg2-binary==2.8.6
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work
pydot==1.4.1
PyJWT==1.7.1
pykwalify==1.7.0
pymongo==3.8.0
pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1594392929924/work
pyparsing==2.4.7
pyreadline==2.1
pyrsistent==0.17.3
PySocks @ file:///C:/ci/pysocks_1594394709107/work
python-crfsuite==0.9.7
python-dateutil==2.8.1
python-engineio==3.11.2
python-socketio==4.4.0
python-telegram-bot==11.1.0
pytz==2019.3
PyYAML==5.3.1
questionary==1.5.2
rasa==1.9.1
rasa-sdk==1.10.3
redis==3.5.3
regex==2020.9.27
requests @ file:///tmp/build/80754af9/requests_1592841827918/work
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
rfc3986==1.4.0
rocketchat-API==0.6.36
rsa @ file:///tmp/build/80754af9/rsa_1596998415516/work
ruamel.yaml==0.15.100
ruamel.yaml.clib==0.2.2
s3transfer==0.3.3
sanic==19.12.2
Sanic-Cors==0.10.0.post3
sanic-jwt==1.3.2
Sanic-Plugins-Framework==0.9.4.post1
scikit-learn==0.22.2.post1
scipy==1.4.1
sentry-sdk==0.19.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.2.2
tensorboard-plugin-wit==1.6.0
tensorflow==2.2.0
tensorflow-addons==0.11.2
tensorflow-estimator==2.2.0
tensorflow-hub==0.7.0
tensorflow-probability==0.7.0
termcolor==1.1.0
terminaltables==3.1.0
threadpoolctl==2.1.0
tornado==6.1
tqdm==4.31.1
twilio==6.26.3
typeguard==2.10.0
typing-extensions==3.7.4.3
tzlocal==2.1
ujson==1.35
urllib3 @ file:///tmp/build/80754af9/urllib3_1603305693037/work
wcwidth==0.2.5
webexteamssdk==1.1.1
websockets==8.1
Werkzeug==0.16.1
win-inet-pton==1.1.0
wincertstore==0.2
wrapt==1.12.1
yarl==1.5.1
zipp @ file:///tmp/build/80754af9/zipp_1604001098328/work

(rasainstallation) c:\Rasa>

hm strange, your tensorflow versions seem to be too high, I think you need 2.1.0 or lower, just based off of this: rasa/poetry.lock at 1.9.1 · RasaHQ/rasa · GitHub

Not entirely sure how you ended up with version 2.2.0, but it’s worth re-running either pip install rasa==1.9.1 completely, which should hopefully resolve the issues. Otherwise you can also install the tensorflow versions manually

I tried using multiple different versions of tensorflow and I kept getting the same error, as above, until I downgraded to 1.14. Below is the stack stable of the error from version 1.14:

Tensorflow version 1.14 won’t work, try version 2.1.0. But which version of python are you on actually? Is it possible it’s 3.8 or 3.9? that might be incompatible

@akelad No worries. I tried every version, of Tensorflow, that I could and none of them worked. I gave up on v1.9.1 of Rasa. I just went ahead and installed the latest version, as well as everything else, and I did not have any issues there. Unfortunately, I needed the 1.9.1 version for work purposes, but at least I can still do a few things. Thank you for your help!