Open msrocka opened 7 years ago
also, it cannot handle the case when there are semicolons in the names ...
Hello Michael, Is this code still functional with the updates from simapro and openlca of this year? When I try to convert and import these .csv files and then import as an 'impact assessment method' with JSON-LD format no (visible) changes are made. Could you point me in the direction i should be looking to solve this? Thank you
csv method files: SBK_CML.zip SBK_EDIP_radioactive_waste_corrected.zip
output spm2olca out_SBK_CML.zip
log from openlca OpenLCA_import_SBK_CML_log.txt
@jsvmonsjou I only checked the SBK_CML.CSV
file. When I open it with a text editor the file looks like this:
{Library 'Ecoinvent 3 - allocation, cut-off by classification - unit'};;;;;
;;;;;
Method;;;;;
;;;;;
Name;;;;;
SBK Bepalingsmethode, 25 mei 2018 (NMD 2.2);;;;;
;;;;;
Version;;;;;
... lots of trailing ;;;;;
. When I remove them e.g. via Notepad++ ...
... I get this error:
es\spm2olca\model.py", line 115, in parse_impact_factor
f.value = float(parts[4].replace(',', '.'))
ValueError: could not convert string to float: 'Catchement Brisbane River'
this is because spm2olca is not smart enough to handle semicolons in flow names. Fortunatelly, there was only one flow "Water, river; GIS: ;Catchement Brisbane River; Country: AU"
with semicolons
in the name. When I replace them with commas, the conversion works and I could import the result into openLCA:
hope this helps
Thank you so much for investigating! The steps you described I managed to replicate. Conversion by spm2olca now works! thank you! The only problem I encounter now is that no impacts are shown/calculated. General information, Impact Factors, and Normalization and Weighting seem correct in the impact assessment method. Would you have any idea what I am overlooking at the moment?
@jsvmonsjou late response, sorry... maybe this is related to missing flow mappings? See the readme file for instructions how to apply mappings in the conversion.
Currently only semicolons are supported but this could be read from the file header: