@alimly13 welcome to the KNIME forum. Could you check if you bring the result table back to KNIME?
Maybe you could provide us with a sample without spelling any secrets.
Then as a hint you can use preformated code to make Python code easier to read: