Skip to content

CSV Parser: Inadequate handling of parameter columns_required #2679

@sebix

Description

@sebix

Leaving the parameter columns_required unset (empty) leads to this error:

2025-12-24 13:41:34,279 - addresslog-parser - ERROR - Bot initialization failed.
Traceback (most recent call last):
  File "/home/sebastianw/dev/intelmq/intelmq/lib/bot.py", line 241, in __init__
    self.init()
    ~~~~~~~~~^^
  File "/home/sebastianw/dev/intelmq/intelmq/bots/parsers/generic/parser_csv.py", line 74, in init
    raise ValueError("Length of parameters 'columns' (%d) and 'columns_required' (%d) "
                     "needs to be equal." % (len(self.columns), len(self.columns_required)))

According to the docs, not setting the parameter should assume that all columns are required.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions