Rasa_nlu.utils' has no attribute 'json_pickle'

Hi,

I am getting below issue

rasa_nlu.utils’ has no attribute ‘json_pickle’

Code is below

def persist(self, model_dir): “”“Persist this model into the passed directory.”"" similarity_file = os.path.join(model_dir, SIMILARITY_MODEL_FILE_NAME) utils.json_pickle(similarity_file, self) return {“similarity_file”: SIMILARITY_MODEL_FILE_NAME}

Hi @prithvini04

which version of rasa do you use? If 1.0 and higher, try to use:

from rasa.nlu import utils

Did that help?

Regards

yes, upgraded and using rasa.nlu, working fine.

Thanks you.

Hi, when implementing the sentiment analysis component and training keep getting the error: AttributeError: module ‘rasa.utils’ has no attribute ‘json_pickle’.

I did import utils from rasa.nlu still getting the error: from rasa.nlu import utils

Tried with rasa versions 1.9.0 and 1.10.0

Tried to use python pickle module as well but no luck yet. Any specific thing that I am missing?

meant to say:

AttributeError: module ‘rasa.nlu.utils’ has no attribute ‘json_pickle’