majeau-bettez / ecospold2matrix

Class for recasting Ecospold2 LCA dataset into Leontief matrix representations or Supply and Use Tables
BSD 2-Clause "Simplified" License
17 stars 19 forks source link

xml files contain BOM #2

Closed eabouman closed 8 years ago

eabouman commented 8 years ago

Hi Guillaume,

When I try to parse the xml files in line 785 and 1011 I get an error message that the '<' sign is not in line 1 column 1. When inspecting the file with open(fp).readline() we discovered that the xml's contain a Byte Order Mark. We have been able to get around this by adjusting line 784 and line 1010 as follows:

with open(fp, 'r', encoding="utf-8") as fh:

ecoinvent now parses properly. Haven't been able to produce a C- matrix yet

majeau-bettez commented 8 years ago

Fixed by commit 17bd535. Nice that you found the source of the discrepancy!