cyrillefrancois / openlca2bw

Other
9 stars 5 forks source link

Does the library support any background base (or 'nonuser_database')? #14

Open qtu-UBC opened 6 months ago

qtu-UBC commented 6 months ago

I imported this TianGong database (https://www.tiangong.earth/downloads) to openLCA 2.0.4 and created a process folder called "qt_test" with one process in it (copied from the TianGong database itself). Then I try to use load_openLCA_IPC() to convert my "qt_test" process folder into a bw database. But encounter the following error:

`File "C:\Users\XXX\Documents\openlca2bw_2x_gen.venv\Lib\site-packages\openlca2bw\extract.py", line 304, in build_process_dict
ref_exch = [exc for exc in exch if (return_attribute(exc,'quantitativeReference') or return_attribute(exc,'isQuantitativeReference'))][0]


IndexError: list index out of range`

My guess is that somehow the quantitative reference of the process was not picked up by the `return_attribute()` function. Is the function written in the way that is generic to the schema of any database? Thank you!