diff --git a/commodity.py b/commodity.py index 8d4e0094..53c8a3e4 100644 --- a/commodity.py +++ b/commodity.py @@ -55,6 +55,6 @@ def export(data, kind=COMMODITY_DEFAULT, filename=None): line = sep.join([line, str(int(commodity['meanPrice'])), str(commodity['id']), data['timestamp'] + '\n']) else: line = sep.join([line, data['timestamp'] + '\n']) - h.write(line.encode('utf-8')) + h.write(line) h.close() diff --git a/companion.py b/companion.py index 80c16bbc..e7e9e6ab 100644 --- a/companion.py +++ b/companion.py @@ -447,7 +447,7 @@ def fixup(data): if not commodity_map: # Lazily populate for f in ['commodity.csv', 'rare_commodity.csv']: - with open(join(config.respath, f), 'rb') as csvfile: + with open(join(config.respath, f), 'r') as csvfile: reader = csv.DictReader(csvfile) for row in reader: commodity_map[row['symbol']] = (row['category'], row['name'])