Closed pbaustert closed 3 years ago
The issue results from the load() method, which returns a list of tuples instead of a list of lists. That's why you can not validate data of an existing method:
To illustrate: the following example fails for me:
method_data = Method(('CML 2001 (obsolete)', 'acidification potential', 'generic')).load()
my_method = Method(('my method', 'a method', 'oh what a method'))
my_method.validate(method_data)
However, I don't see an easy to fix this. Closing the issue for now.
Hi,
I am experiencing errors when trying to validate new method data as shown here:
https://github.com/pbaustert/bw2_reg_cfs/blob/main/notebooks/regionalisation_demo.ipynb
yielding the following error message:
MultipleInvalid: expected a list @ data[0]
I believe that this is related to the following lines:
https://github.com/brightway-lca/brightway2-data/blob/8d2e519f840ded0a700bb0d17df32e9182bb5577/bw2data/validate.py#L51-L52
Replacing lists with tuples solves the issue for me locally: