Illegal instruction(core dumped)

hi, i downloaded a virtual machine which contains rasa and rasa x. but when i tape any command it gives me this error. can any one help??

@Sou90, The problem is related to tensorflow

can you run

python -m tensorflow

and see you are getting same error Illegal instruction and also can you check your tensorflow version you are using and share it here.

@MuraliChandran14


tensorflow version

@Sou90,

You can downgrade your tensorflow to

pip install tensorflow==1.5.0

or

the other option is to compile the binaries from source. The precompiled binaries of versions >1.5.

Stackoverflow reference

@MuraliChandran14 it will preserve my project on rasa?? because everything was working fine in another machine, while i imported the vm into another machine I encountered this problem. I will try this, i hope it will work

@Sou90, If you are using Older CPU, AVX instruction does not support, That’s why we have to downgrade tensorflow to minimum and check if its working or not.

@MuraliChandran14

@Sou90 update your tensorflow to pip install tensorflow==1.15.0. I just checked in my PC using venv and it worked.

@MuraliChandran14 i did and it gives me the same error AttributeError: module ‘tensorflow.python.util.compat’ has no attribute ‘v1’

@erohmensing,

Need your help.

@Sou90 here is using Ubuntu. First he had tensorflow 2.1.0 and got the Illegal Instruction(core dumped) error.

I told him to downgrade tensorflow to 1.15.0 because his CPU not supporting AVX instruction. Once he installed tensorflow 1.15.0. He is getting this error AttributeError: module ‘tensorflow.python.util.compat’ has no attribute ‘v1’.

tf.compat.v1.logging are supported in tensorflow 2 right and now he is using tensorflow 1.15.0, Is it good idea to change tf.compat.v1.logging to tf.logging in utlis\common.py, because of the older version tensorflow he installed on his CPU.

From my side, I created venv and tested tensorflow 1.5.0, I had the same problem and changed the tf.compat.v1.logging to tf.logging in utlis\common.py and it worked fine.

Is there any other solution apart from compile the tensorflow binaries from source.?.

It would be really helpful for him, If you guide him on this issue.

@erohmensing can you help me please, this project must be completed before the 26/06 @MuraliChandran14 i have a question, when i upgrade tensorflow does it require to reinstall or to upgrade rasa and rasa rasa x too?? it will not cause a problem,??

You changed these lines??

import tensorflow as tf

log_level = os.environ.get(ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES)

if log_level == "DEBUG":
    tf_log_level = tf.compat.v1.logging.DEBUG
elif log_level == "INFO":
    tf_log_level = tf.compat.v1.logging.INFO
elif log_level == "WARNING":
    tf_log_level = tf.compat.v1.logging.WARN
else:
    tf_log_level = tf.compat.v1.logging.ERROR

tf.compat.v1.logging.set_verbosity(tf_log_level)
logging.getLogger("tensorflow").propagate = False

No need to upgrade.

Yes, I changed it to tf.logging to the part where I got attribute error

Hi guys,

Each version of rasa has specific tensorflow versions that are compatible with it. Downgrading to 1.15.0 will likely make you run into issues as much of the code had to be updated to support tensorflow 2.0.

If you need to use tensorflow 1.15.0, I’d recommend downgrading to rasa 1.7.4 and therefore rasa x 0.25.3.

@erohmensing @MuraliChandran14 it didn’t work. any way thanks for your help