Project

General

Profile

Actions

Bug #6497

closed

Mentat does not store events with missing Node[*].Name

Added by Pavel Kácha about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Development - Core
Target version:
Start date:
11/04/2020
Due date:
% Done:

100%

Estimated time:
To be discussed:
No

Description

Node[*].Name is not mandatory, however internal Idea converter seems to expect it and crumbles.

2020-09-03 13:50:28,291 mentat-storage.py [38488] ERROR: Component 'storage': Unable to store IDEA message 'mentat-hub.5009.1598934233.799019.42.159097562.idea' into database: 'Traceback (most recent call last):
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/daemon/component/storage.py", line 260, in cbk_event_message_process
    self.event_gateway(daemon, args)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/daemon/component/storage.py", line 104, in _event_insert_bulk
    self.event_service.insert_event_bulkci(args['idea'])
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 951, in wrapped_f
    return func(other_self, *args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 1275, in insert_event_bulkci
    self.cursor.insert_event(idea_event)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 593, in insert_event
    idea_pgsql = mentat.idea.sqldb.Idea(idea_event)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/idea/sqldb.py", line 178, in __init__
    self.node_name = idea_event.get_detectors()
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/idea/internal.py", line 264, in get_detectors
    return [node['Name'] for node in self.get('Node', [])]
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/idea/internal.py", line 264, in <listcomp>
    return [node['Name'] for node in self.get('Node', [])]
  File "/var/mentat/venv/lib/python3.7/site-packages/typedcols.py", line 192, in __getitem__
    return self.data[key]
KeyError: 'Name'
'

Files

case.idea (755 Bytes) case.idea Pavel Kácha, 09/03/2020 02:50 PM

Related issues

Related to Mentat - Bug #6698: Use of deprecated function in test_sqldb.pyClosedPavel Kácha11/04/2020

Actions
Actions

Also available in: Atom PDF