Skip to content

Bot debugger crashes when one bot has no parameters defined #2683

@sebix

Description

@sebix
intelmq@server:/etc/intelmq$ intelmqctl run test-collector -l DEBUG
Starting test-collector...
Could not initialize logger, only logging to stdout.
INFO - HTTPCollectorBot initialized with id test-collector and intelmq 3.5.0 and python 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] as process 56441. Standalone mode: True.
DEBUG - Library path: '/usr/lib/python3/dist-packages/intelmq/lib/bot.py'.
DEBUG - Loading runtime configuration from '/etc/intelmq/runtime.yaml'.
CRITICAL - Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 172, in __init__
    self.__load_configuration()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 831, in __load_configuration
    self.__runtime_settings = utils.get_runtime()
                              ~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot_debugger.py", line 210, in new_get_runtime
    config[bot_id]['parameters']["logging_level"] = logging_level
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'parameters'

INFO - Bot stopped.
Bot exited with code 1.
Could not initialize logger, only logging to stdout.
INFO - Bot stopped.
Exception ignored in: <function Bot.__del__ at 0x7fd23fca28e0>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 570, in __del__
    return self.stop(exitcode=0)
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 603, in stop
    sys.exit(exitcode)
SystemExit: 0

The configuration of the system and the cause:

test-collector:
  module: intelmq.bots.collectors.http.collector_http
  parameters:
    http_username: foo
    destination_queues: some-parser-queue
some-parser:
  module: intelmq.bots.parsers.generic.parser_csv

as some-parser has no parameters, the bot debugger crashes because of it

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions