DeepPavlov icon indicating copy to clipboard operation
DeepPavlov copied to clipboard

AttributeError: 'NoneType' object has no attribute 'form' в kbqa_cb_rus

Open prshir opened this issue 4 years ago • 1 comments

Запускаю модель kbqa для русского языка

from deeppavlov import configs, build_model
kbqa_model = build_model(configs.kbqa.kbqa_cq_rus, download=False)
ans = input()
print(kbqa_model([ans]))

Один вопрос (а именно "на каком месте Россия по площади территории?") из ~50 проверенных приводит к ошибке:

Traceback (most recent call last):
  
File "/home/ddd/PycharmProjects/pythonProject/main.py", line 11, in <module>
    
  print(kbqa_model([ans]))
  
File "/home/ddd/.local/lib/python3.6/site-packages/deeppavlov/core/common/chainer.py", line 207, in __call__
    
  return self._compute(*args, param_names=self.in_x, pipe=self.pipe, targets=self.out_params)
  
File "/home/ddd/.local/lib/python3.6/site-packages/deeppavlov/core/common/chainer.py", line 230, in _compute
    
  res = component.__call__(*x)
  
File "/home/ddd/.local/lib/python3.6/site-packages/deeppavlov/models/kbqa/tree_to_sparql.py", line 60, in __call__
      log.debug(f"syntax tree info, root: {root.form}")

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

prshir avatar Aug 07 '20 04:08 prshir

Thank you for this issue, the bug will be fixed in the next release.

dmitrijeuseew avatar Aug 08 '20 11:08 dmitrijeuseew

@prshir, sorry for the late response. We tested this issue on DeepPavlov version 1.2.0 and didn’t encounter the described problem. If you are still having difficulties with this, please let us know.

IgnatovFedor avatar Jul 06 '23 12:07 IgnatovFedor