modsecurity-parser icon indicating copy to clipboard operation
modsecurity-parser copied to clipboard

ValueError: Single argument to subplot must be a three-digit integer, not <Axes: >

Open shaund-teqcle-co-za opened this issue 2 years ago • 2 comments

First time clone, install pre-requisites and run. It simply throws a stack trace:

[shaund@peregrine modsecurity-parser]$ python3 modsecurity_parser.py -f /home/shaund/tmp/mod_sec/modsec_audit.log input_filename: /home/shaund/tmp/mod_sec/modsec_audit.log ----- modsec_audit events processed: 990 ----- ----- modsec_audit events skipped by INCLUDED/EXCLUDED options or INVALID: 0 ----- Traceback (most recent call last): File "/home/shaund/Software/modsecurity-parser/modsecurity_parser.py", line 864, in output_with_graphs = modsec_view_graphs(modsec_entries) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shaund/Software/modsecurity-parser/modsecurity_parser.py", line 565, in modsec_view_graphs plt.subplot(ax21) File "/usr/lib64/python3.11/site-packages/matplotlib/pyplot.py", line 1323, in subplot key = SubplotSpec._from_subplot_args(fig, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/site-packages/matplotlib/gridspec.py", line 575, in _from_subplot_args raise ValueError( ValueError: Single argument to subplot must be a three-digit integer, not <Axes: >

shaund-teqcle-co-za avatar Oct 10 '23 11:10 shaund-teqcle-co-za

Might be it fails due to Python 3.11. It hasn't been tested with this version yet.

molu8bits avatar Oct 11 '23 20:10 molu8bits

Thanks molu8bits. I ran it on Python 3.9.16 and it runs fine.

shaund-teqcle-co-za avatar Oct 12 '23 08:10 shaund-teqcle-co-za