From 77d88823772dffc6b8ee99b0443652c448ebb24d Mon Sep 17 00:00:00 2001 From: imp-sh <75337241+imp-sh@users.noreply.github.com> Date: Wed, 5 Jan 2022 02:59:57 -0500 Subject: [PATCH] - Changed row[0] -> row[field] on line 202. SSDictCursor returns rows as a dictionary. Trying to access the row dict with an index throws a KeyError. --- mysql_example/mysql_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql_example/mysql_example.py b/mysql_example/mysql_example.py index 5e257e13..db01ff75 100644 --- a/mysql_example/mysql_example.py +++ b/mysql_example/mysql_example.py @@ -199,7 +199,7 @@ def cluster_ids(clustered_dupes): with read_con.cursor() as cur: cur.execute("SELECT DISTINCT {field} FROM processed_donors " "WHERE {field} IS NOT NULL".format(field=field)) - field_data = (row[0] for row in cur) + field_data = (row[field] for row in cur) deduper.fingerprinter.index(field_data, field) # Now we are ready to write our blocking map table by creating a