Hi, I recently tried playing with my custom fields in harmonization.conf which would be needed for a potential bot. However I ran into some problems with that during testing, following is the displayed error:
"AssertionError: Regex matched: 'ERROR' matches '(ERROR.*?){1}' Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/intelmq/lib/bot.py", line 145, in start\n self.process() File "/untitled/test_bot.py", line 34, in process event.add("test.field", 50) File "/usr/local/lib/python3.5/dist-packages/intelmq/lib/message.py", line 188, in add raise exceptions.InvalidKey(key) intelmq.lib.exceptions.InvalidKey: invalid key 'test.field'
Configuration in harmonization.conf is as follows for event and for report: "'test.field": {"description": "test value", "type": "Integer"},
I checked whether I am using the version in /opt/intelmq/etc/ and everything seemed to be ok. I couldn't figure out what is wrong because everything seems to be in order. I am using the 1.0.0 version of intelmq, on elementary OS 0.4.1.
-- Sincerely, Václav Brůžek
Hi, On 08/21/2017 03:53 PM, Vaclav Bruzek wrote:
"AssertionError: Regex matched: 'ERROR' matches '(ERROR.*?){1}' Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/intelmq/lib/bot.py", line 145, in start\n self.process() File "/untitled/test_bot.py", line 34, in process event.add("test.field", 50) File "/usr/local/lib/python3.5/dist-packages/intelmq/lib/message.py", line 188, in add raise exceptions.InvalidKey(key) intelmq.lib.exceptions.InvalidKey: invalid key 'test.field'
Configuration in harmonization.conf is as follows for event and for report: "'test.field": {"description": "test value", "type": "Integer"},
I checked whether I am using the version in /opt/intelmq/etc/ and everything seemed to be ok. I couldn't figure out what is wrong because everything seems to be in order. I am using the 1.0.0 version of intelmq, on elementary OS 0.4.1.
How do you start the tests? The mix of local/lib and some custom directory looks strange. The test suite uses the harmonization.conf in intelmq/etc/harmonization.conf, not the installed one. You can run the tests for a locally changed intelmq without affecting a installation or requiring root to run them.
Sebastian