I am trying to extract data from excel to postgresql using python 3.6 and pgadmin 4. Here is a part of my code that is failing.
if dataCentersName not in dataCenters:
dataCenters.add(dataCentersName)
query1 += "('" + str(dataCentersIdx) + "', '" + str(dataCentersName) + "'),"
dataCentersDict[dataCentersName] = dataCentersIdx
dataCentersIdx += 1
The error is at the comma after the last data center showing below ('8', 'DataCenter_8'),
It says: Error %s % e syntax error at end of input
Thank you very much!