1
votes

I'm studying chatbot with rasa.com, apixu, api.slack. But at the time want to training data, even out errors like this. Can you help me to solve this problem?

By the way I use anaconda3, python 3.6.


C:\Program Files\Anaconda3>python train_init.py

C:\Program Files\Anaconda3\lib\site-packages\h5py__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.

from ._conv import register_converters as _register_converters

Using TensorFlow backend.

Traceback (most recent call last): File "train_init.py", line 17, in agent = Agent('weather_domain.yml', policies = [MemoizationPolicy(), KerasPolicy()])

File "C:\Program Files\Anaconda3\lib\site-packages\rasa_core\agent.py", line 42, in init

self.domain = self._create_domain(domain)

File "C:\Program Files\Anaconda3\lib\site-packages\rasa_core\agent.py", line 237, in _create_domain

return TemplateDomain.load(domain)

File "C:\Program Files\Anaconda3\lib\site-packages\rasa_core\domain.py", line 435, in load

slots = cls.collect_slots(data.get("slots", {}))

File "C:\Program Files\Anaconda3\lib\site-packages\rasa_core\domain.py", line 479, in collect_slots

slot_class = Slot.resolve_by_type(slot_dict[slot_name].get("type"))

AttributeError: 'NoneType' object has no attribute 'get'

1

1 Answers

0
votes

In your case slot_dict[slot_name] is None. Make sure it is not None but some object. Here is the same error in a simplified way reflecting what happened in your scenario:

>>> d = {'key': None}
>>> d['key'].get('type')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'get'