Dict object has no attribute 'max_history'

Hi,

I am using rasa_core version 0.14.4

While running bot I am getting: ‘dict’ object has no attribute max_history

Logs

File "/code/services/ai_api/packages/rasa_core/agent.py", line 281, in load
ensemble = PolicyEnsemble.load(path) if path else None
File "/code/services/ai_api/packages/rasa_core/policies/ensemble.py", line 228, in load policy = policy_cls.load(policy_path)
File "/code/services/ai_api/packages/rasa_core/policies/memoization.py", line 231, in load lookup=data["lookup"])
File "/code/services/ai_api/packages/rasa_core/policies/form_policy.py", line 30, in __init__ lookup=lookup)
File "/code/services/ai_api/packages/rasa_core/policies/memoization.py", line 68, in __init__ self.max_history = self.featurizer.max_history
AttributeError: 'dict' object has no attribute 'max_history'

Fixed it as

try:
   self.max_history = self.featurizer['max_history']
except TypeError:
   self.max_history = self.featurizer.max_history

It is now working fine. Any thoughts on this?

Hi @Basit-qc , Unfortunately, we do not support that version anymore. I would highly recommend you to bump the version to latest release.

if I want to exactly match all stories, how to set max_history? thanks so much

Use memoization policy instead.