From d4eb95b64b57687b28b5adfaa95e56b118f11416 Mon Sep 17 00:00:00 2001 From: Kai Date: Thu, 6 May 2021 15:13:26 +0200 Subject: [PATCH] make code more robust --- tsvtools/tsv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsvtools/tsv.py b/tsvtools/tsv.py index 799b1b5..aeafb8a 100644 --- a/tsvtools/tsv.py +++ b/tsvtools/tsv.py @@ -29,7 +29,7 @@ def write_tsv(tsv, urls, tsv_out_file): for url_id, part in tsv.groupby('url_id'): with open(tsv_out_file, 'a') as f: - f.write('# ' + urls[url_id] + '\n') + f.write('# ' + urls[int(url_id)] + '\n') part.to_csv(tsv_out_file, sep="\t", quoting=3, index=False, mode='a', header=False)