As I was importing a file from the function
`dict_activities=create_target_databases(r"Artikel2/02_BW_datasets/DB_Energy.xlsx", 'Energy'),
# Step 3: Import data from the specified Excel file
imp = bio.ExcelImporter(filepath)
imp.apply_strategies()
imp.match_database(database, fields=('name', 'unit', 'location'))
imp.match_database(fields=('name', 'unit', 'location'))
imp.match_database('biosphere3', fields=('name', 'unit', 'categories'))
imp.write_database()
which has the above lines of code in it, I got an InvalidExchange error.Excel File for DB_Energy. this error occured when I migrated from BW2 to BW2.5.
I tried checking missing fields, as suggested by Chris Mutel in other posts which gave the output message:Applied 16 strategies in 5.70 seconds
7 datasets
7 exchanges
7 unlinked exchanges
Type technosphere: 7 unique unlinked exchanges.
I also tried adding column name “reference product” and removing “unit” from the excel file, also added them here in the code below and re ran the code, issue still persisted.
Step 3: Import data from the specified Excel file
imp = bio.ExcelImporter(filepath)
imp.apply_strategies()
imp.match_database(database, fields=('name', 'unit', 'location'))
imp.match_database(fields=('name', 'unit', 'location'))
imp.match_database('biosphere3', fields=('name', 'unit', 'categories'))
imp.write_database().
Please guide what changes I can make and do not hesitate to ask for any other code snippets required if so.
thenewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.