我一直在尝试导入并将简单的Simpro CSV导出数据集链接到ecoinvent。然而我遇到麻烦,因为我无法命名转换迁移。
sp = SimaProCSVImporter("/Users/mklarmann/Google Drive/Eaternity/Science/8.LCA/Bouillion.CSV", "Bouillion")
sp.statistics()
Extracted 1 unallocated datasets in 0.02 seconds
1 datasets
22 exchanges
22 unlinked exchanges
Type production: 1 unique unlinked exchanges
Type technosphere: 16 unique unlinked exchanges
这是错误:
sp.migrate("simapro-ecoinvent-3")
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-42-94e5fcd827af> in <module>()
----> 1 sp.migrate("simapro-ecoinvent-3")
/Users/mklarmann/Documents/workspace/miniconda3/envs/bw2/lib/python3.4/site-packages/bw2io/importers/base_lci.py in migrate(self, migration_name)
240
241 def migrate(self, migration_name):
--> 242 self._migrate_datasets(migration_name)
243 self._migrate_exchanges(migration_name)
244
/Users/mklarmann/Documents/workspace/miniconda3/envs/bw2/lib/python3.4/site-packages/bw2io/importers/base.py in _migrate_datasets(self, migration_name)
107 def _migrate_datasets(self, migration_name):
108 assert migration_name in migrations, \
--> 109 u"Can't find migration {}".format(migration_name)
110 self.apply_strategy(
111 functools.partial(migrate_datasets, migration=migration_name)
AssertionError: Can't find migration simapro-ecoinvent-3
任何帮助都非常受欢迎!
答案 0 :(得分:0)
我发现了问题。我在一个现有的项目中工作。从头开始(删除应用程序目录https://github.com/ActiveState/appdirs中的所有数据)并执行bw2setup()使其工作。