Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion error: more than one intersecting geocollection #2

Open
Pommespapst opened this issue May 17, 2019 · 0 comments
Open

Assertion error: more than one intersecting geocollection #2

Pommespapst opened this issue May 17, 2019 · 0 comments

Comments

@Pommespapst
Copy link

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')}

@Pommespapst Pommespapst changed the title Assertion error: more than one intersection geocollection Assertion error: more than one intersecting geocollection May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant