Rasa_nlu.utils' has no attribute 'json_pickle' - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum

Introducing the Rasa Playground

Rasa_nlu.utils’ has no attribute ‘json_pickle’

post by prithvini04 on Jun 25, 2019

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}

post by JulianGerhard on Jun 25, 2019

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


post by prithvini04 on Jun 25, 2019

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

Thanks you.


post by samgpt on Apr 30, 2020

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?


post by samgpt on Apr 30, 2020

meant to say:

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