csvfile.seek(0)# Seems dumb that this is necessary, maybe it's moving on thanks to the sniffing? But without this, DictReader will read the //second// line as the column headers
reader=csv.DictReader(csvfile,dialect=sniffed)
forrowinreader:
#print(row)
forkeyinrow.keys():
ifkey=="Spotify URI":
#print("Found a URI, specifically "+row["Spotify URI"])
trackid=tk.from_uri(row["Spotify URI"])[1]
#print(trackid)
track=spotify.track(trackid)
#print("That URI resolves to "+track.name+" by "+track.artists)