I've looked at previous questions but the solutions suggested never worked. What I have found is that if I create a new column in the table and save 2 variables it works as intended. I have a working insert into a different table earlier in the code so I know the method works. The only difference being this query has a single variable.
Here is the code:
cursor.execute("INSERT INTO docs (filingNum) VALUES (%s)", (docNum))
database.commit()
I get the following output. The string of numbers being what I want to insert into the table.
docNum is: 0000928052-21-000002
Traceback (most recent call last):
File "/home/andy/Documents/testing/concat.py", line 76, in <module>
sec_rss()
File "/home/andy/Documents/testing/concat.py", line 68, in sec_rss
cursor.execute("INSERT INTO docs (filingNum) VALUES (%s", (docNum))
File "/home/andy/.local/lib/python3.9/site-packages/mysql/connector/cursor_cext.py", line 257, in execute
prepared = self._cnx.prepare_for_mysql(params)
File "/home/andy/.local/lib/python3.9/site-packages/mysql/connector/connection_cext.py", line 651, in prepare_for_mysql
raise ValueError("Could not process parameters")
ValueError: Could not process parameters