我在Brightway(Spyder(Python 3.6,BW2的最新版本,Windows 64)中导入ecoinvent 3.3时遇到了麻烦。我正在参加workshop2017,一切正常,直到我实际堆叠的LCI子章节为止,因为我无法导入ecoinvent 3.3,我可以使用ecoinvent(甚至是3.5),但是我只想参加研讨会,因为我无法解决2.2无关的交换问题。
我已经下载并导入了ecoinvent 3.3_cutoff_ecoSpold02文件,并将其放置在一个文件夹中,该文件夹指向开发人员/或研讨会提供的代码:
fpei33 = r'C:\Users\gaylordb\Documents\Golf\OiErgasiesMou\ei33'
if 'ecoinvent 3.3 cutoff' in bw.databases:
print("Database has already been imported")
else:
ei33 = bw.SingleOutputEcospold2Importer(fpei33, 'ecoinvent 3.3 cutoff')
ei33.apply_strategies()
ei33.statistics()
结果是:
Extracting XML data from 0 datasets
Extracted 0 datasets in 0.18 seconds
Applying strategy: normalize_units
Applying strategy: update_ecoinvent_locations
Applying strategy: remove_zero_amount_coproducts
Applying strategy: remove_zero_amount_inputs_with_no_activity
Applying strategy: remove_unnamed_parameters
Applying strategy: es2_assign_only_product_with_amount_as_reference_product
Applying strategy: assign_single_product_as_activity
Applying strategy: create_composite_code
Applying strategy: drop_unspecified_subcategories
Applying strategy: fix_ecoinvent_flows_pre35
Applying strategy: drop_temporary_outdated_biosphere_flows
Applying strategy: link_biosphere_by_flow_uuid
Applying strategy: link_internal_technosphere_by_composite_code
Applying strategy: delete_exchanges_missing_activity
Applying strategy: delete_ghost_exchanges
Applying strategy: remove_uncertainty_from_negative_loss_exchanges
Applying strategy: fix_unreasonably_high_lognormal_uncertainties
Applying strategy: set_lognormal_loc_value
Applying strategy: convert_activity_parameters_to_list
Applied 19 strategies in 0.02 seconds
0 datasets
0 exchanges
0 unlinked exchanges
如果我随后继续编写数据库,则会得到以下信息:
ei33.write_database()追溯(最近一次调用为最后一次):
文件“”,第1行,在 ei33.write_database()
文件 “ C:\ Users \ gaylordb \ AppData \ Local \ Continuum \ miniconda3 \ envs \ mylcaenv \ lib \ site-packages \ bw2io \ importers \ base_lci.py”, write_database中的第207行 引发WrongDatabase(错误)
错误的数据库:活动数据库必须是ecoinvent 3.3的下限,但是 还找到了set()
请帮助。
谢谢。
答案 0 :(得分:0)
您的数据或路径有问题-请参阅第Extracted 0 datasets in 0.18 seconds
行。也许您没有提取7z存档?