这里有一个以前的问题,但它没有帮助我解决我的问题:
当我尝试使用 .amount = myamount 更改交换金额时,我总是收到“无法设置属性错误”。
这是我所做的:
## search for activity
msw = [get_activity(key) for key, ds in eco.items() if
'treatment of municipal solid waste, incineration' in ds['name'] and
ds['location'] == ('BE') and ds['unit'] == 'kilogram']
和
##make a copy
msw_be = msw.copy()
##get exchange
Carbon_dioxide_non_fossil = [exc for exc in mswi_be.biosphere() if 'Carbon dioxide, non-fossil' in exc['name']][0]
接着
##change amount
Carbon_dioxide_non_fossil.amount = 0.75152
这是我得到错误的地方。感谢你们对我的帮助。