|
csv_reader = csv.DictReader(file) |
this line needs to be adjusted with "csv.DictReader(file, delimiter=';')" since the delimiter in CSV in this situation is not (confusingly) a comma but a semicolon. I don't think this needs to be fixed, I am just leaving it here in case someone else needs to make the same adjustment.
Finally in numeric values in French locale, the "." is really emitted as a comma, so one needs to mass-replace "," with ".".
Similarly, if you see errors such as :
ValueError: could not convert string to float: '\u202f12320'
that is because the thousand separator is \u202f ("_"), so one needs to edit the file to remove those characters.
Once these 3 issues are adressed, it is possible to run the tool with the CSV file.
tax-tool/tax.py
Line 53 in f1c1e94
this line needs to be adjusted with "csv.DictReader(file, delimiter=';')" since the delimiter in CSV in this situation is not (confusingly) a comma but a semicolon. I don't think this needs to be fixed, I am just leaving it here in case someone else needs to make the same adjustment.
Finally in numeric values in French locale, the "." is really emitted as a comma, so one needs to mass-replace "," with ".".
Similarly, if you see errors such as :
ValueError: could not convert string to float: '\u202f12320'that is because the thousand separator is \u202f ("_"), so one needs to edit the file to remove those characters.
Once these 3 issues are adressed, it is possible to run the tool with the CSV file.