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

Scenario LCA calculation failed. #1122

Closed
shijie6688 opened this issue Nov 12, 2023 · 7 comments · Fixed by #1126
Closed

Scenario LCA calculation failed. #1122

shijie6688 opened this issue Nov 12, 2023 · 7 comments · Fixed by #1126

Comments

@shijie6688
Copy link

shijie6688 commented Nov 12, 2023

Issue

Hello,

I got the following reminder when I tried to do the scenario LCA calculation (eco391):

Adding:biosphere3
Traceback (most recent call last):
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tab.py", line 62, in generate_setup
    new_tab = LCAResultsSubTab(data, self)
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 136, in __init__
    self.setup_tabs()
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 143, in setup_tabs
    self._update_tabs()
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 154, in _update_tabs
    tab.update_tab()
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 634, in update_tab
    self.lca_scores_widget.update_tab()
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 687, in update_tab
    super().update_tab()
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 309, in update_tab
    self.update_plot()
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 693, in update_plot
    df = self.parent.mlca.get_results_for_method(method_index)
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\bwutils\superstructure\mlca.py", line 212, in get_results_for_method
    return pd.DataFrame(
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\pandas\core\frame.py", line 782, in __init__
    mgr = ndarray_to_mgr(
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\pandas\core\internals\construction.py", line 336, in ndarray_to_mgr
    _check_values_indices_shape_match(values, index, columns)
  File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\pandas\core\internals\construction.py", line 420, in _check_values_indices_shape_match
    raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}")
ValueError: Shape of passed values is (6, 22), indices imply (5, 22)
@marc-vdm
Copy link
Member

This is a duplicate of #1103.

We are working on fixing this!

@marc-vdm
Copy link
Member

@shijie6688 to help us fix this, could you share a screenshot of your calculation setup?

@shijie6688
Copy link
Author

shijie6688 commented Nov 16, 2023

Here is a screenshot of the calculation set. I have tried different processes. Somehow parts of these processes can be calculated. But after adding specific processes, it doesn't work. The corresponding reminder is also listed here:

C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser_init_.py:55: UserWarning: constrained_layout not applied because axes sizes collapsed to zero. Try making figure larger or axes decorations smaller.
sys.exit(qapp.exec_())
+showing tab:Activity Details
+showing tab:Activity Details
+showing tab:Activity Details
+showing tab:Activity Details
+showing tab:Activity Details
+showing tab:Activity Details
Pandas Dataframe passed to sync.(449, 6)
Dropevent from:<activity_browser.ui.tables.inventory.ActivitiesBiosphereTable(0x204e306e8e0) at 0x00000204DE217E40>
Dropevent from:<activity_browser.ui.tables.inventory.ActivitiesBiosphereTable(0x204e306e8e0) at 0x00000204DE217E40>
Dropevent from:<activity_browser.ui.tables.inventory.ActivitiesBiosphereTable(0x204e306e8e0) at 0x00000204DE217E40>
-hiding tab:LCA results
-hiding tab:ScenarioLink
-hiding tab:Debug
Traceback (most recent call last):
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tab.py", line 62, in generate_setup
new_tab = LCAResultsSubTab(data, self)
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 136, in init
self.setup_tabs()
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 143, in setup_tabs
self._update_tabs()
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 154, in _update_tabs
tab.update_tab()
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 634, in update_tab
self.lca_scores_widget.update_tab()
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 687, in update_tab
super().update_tab()
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 309, in update_tab
self.update_plot()
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\layouts\tabs\LCA_results_tabs.py", line 693, in update_plot
df = self.parent.mlca.get_results_for_method(method_index)
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\activity_browser\bwutils\superstructure\mlca.py", line 212, in get_results_for_method
return pd.DataFrame(
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\pandas\core\frame.py", line 782, in init
mgr = ndarray_to_mgr(
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\pandas\core\internals\construction.py", line 336, in ndarray_to_mgr
_check_values_indices_shape_match(values, index, columns)
File "C:\Users\weisj\Anaconda3\envs\ab_eco391\lib\site-packages\pandas\core\internals\construction.py", line 420, in _check_values_indices_shape_match
raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}")
ValueError: Shape of passed values is (5, 31), indices imply (4, 31)

@shijie6688
Copy link
Author

MicrosoftTeams-image

@marc-vdm
Copy link
Member

So just to be clear: this setup does not work?

@shijie6688
Copy link
Author

So just to be clear: this setup does not work?

Yes

@marc-vdm
Copy link
Member

Great, thank you! This will be fixed when 2.9.3 is released.

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

Successfully merging a pull request may close this issue.

2 participants