Assertion error: more than one intersecting geocollection
Opened this issue · 0 comments
I get an assertion error when executing
for category in CATEGORIES: bwreg.remote.intersection("world", category)
Traceback (most recent call last):
File "C:\Users\user\Programs\Pycharm\PyCharm Community Edition 2018.3.5\helpers\pydev\pydevd.py", line 1741, in
main()
File "C:\Users\user\Programs\Pycharm\PyCharm Community Edition 2018.3.5\helpers\pydev\pydevd.py", line 1735, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Users\user\Programs\Pycharm\PyCharm Community Edition 2018.3.5\helpers\pydev\pydevd.py", line 1135, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Users\user\Programs\Pycharm\PyCharm Community Edition 2018.3.5\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/user/PycharmProjects/BrightwayConda/main_regionalization_test.py", line 65, in
bwreg.remote.intersection("world", category)
File "C:\Users\user\Programs\miniconda\envs\BrightwayConda\lib\site-packages\bw2regional\pandarus_remote.py", line 67, in check_alive
return wrapped(*args, **kwargs)
File "C:\Users\user\Programs\miniconda\envs\BrightwayConda\lib\site-packages\bw2regional\pandarus_remote.py", line 165, in intersection
return import_from_pandarus(filepath)
File "C:\Users\user\Programs\miniconda\envs\BrightwayConda\lib\site-packages\bw2regional\pandarus.py", line 93, in import_from_pandarus
first_collections, second_collections, fp)
File "C:\Users\user\Programs\miniconda\envs\BrightwayConda\lib\site-packages\bw2regional\pandarus.py", line 134, in handle_topographical_intersection
assert len(second_collections) == 1, "Must intersect with exactly one geocollection"
AssertionError: Must intersect with exactly one geocollection
It seems first_colections intersects with two others. Here are the variables' values:
first_collections:
<class 'set'>: {('ecoinvent', 'topocollection'), ('world', 'topocollection'), ('RoW', 'topocollection')}
second_collections:
<class 'set'>: {('watersheds-eq-sw-core', 'geocollection'), ('watersheds-eq-sw-certain', 'geocollection')}