Skip to content

Commit

Permalink
- Changed row[0] -> row[field] on line 202. SSDictCursor returns rows…
Browse files Browse the repository at this point in the history
… as a dictionary. Trying to access the row dict with an index throws a KeyError.
  • Loading branch information
trozzelle committed Jan 5, 2022
1 parent e09cac9 commit 77d8882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysql_example/mysql_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 77d8882

Please sign in to comment.