Good day!!
I’m trying to create a code to acquire specific information from a file .json the Nessus platform.
I initially did it manually, where in the command prompt you enter manual information following what’s on the screen…
However, when I tried to do it in an automated way, I faced the following errors:
insert.py”, line 46, in
line 41, in insert_data_into_mysql
cursor.execute(query, values)
PythonPython312Libsite-packagesmysqlconnectoropentelemetrycontext_propagation.py”, line 102, in wrapper
return method(cnx, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PythonPython312Libsite-packagesmysqlconnectorconnection_cext.py”, line 705, in cmd_query
raise get_mysql_exception(
mysql.connector.errors.IntegrityError: 1048 (23000): Column ‘ip’ cannot be null
And I’m in need of help to understand the mistake and fix it
Here is the code attached:
(confidential information such as host, user, password are censored with a …)
enter image description here
Pedro Bernardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.