brightway-lca / brightway-book

📖🌿 Interactive jupyter-book Documentation for Brightway
https://learn.brightway.dev
BSD 3-Clause "New" or "Revised" License
14 stars 5 forks source link

Error Message #45

Open katzern opened 9 months ago

katzern commented 9 months ago

Using M1 Mac causing this error message following the "BW25 for Beginners" Guide...

Traceback (most recent call last):
  File "/Users/nico/anaconda3/envs/bw_23sep/lib/python3.11/site-packages/matrix_utils/utils.py", line 52, in safe_concatenate_indices
    return np.hstack(arrays)
           ^^^^^^^^^^^^^^^^^
  File "/Users/nico/anaconda3/envs/bw_23sep/lib/python3.11/site-packages/numpy/core/shape_base.py", line 359, in hstack
    return _nx.concatenate(arrs, 1, dtype=dtype, casting=casting)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: need at least one array to concatenate

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/nico/Library/CloudStorage/OneDrive-UniversitätGraz/Optimization Tool/Brightway Course/3 - Inventory data from spreadsheets.py", line 113, in <module>
    lca.lcia()
  File "/Users/nico/anaconda3/envs/bw_23sep/lib/python3.11/site-packages/bw2calc/lca.py", line 393, in lcia
    self.load_lcia_data()
  File "/Users/nico/anaconda3/envs/bw_23sep/lib/python3.11/site-packages/bw2calc/lca.py", line 261, in load_lcia_data
    self.characterization_mm = mu.MappedMatrix(
                               ^^^^^^^^^^^^^^^^
  File "/Users/nico/anaconda3/envs/bw_23sep/lib/python3.11/site-packages/matrix_utils/mapped_matrix.py", line 114, in __init__
    row_indices = safe_concatenate_indices(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nico/anaconda3/envs/bw_23sep/lib/python3.11/site-packages/matrix_utils/utils.py", line 57, in safe_concatenate_indices
    raise AllArraysEmpty
matrix_utils.errors.AllArraysEmpty
michaelweinold commented 9 months ago

...what's the exact cell where the error occurs?

katzern commented 9 months ago

this one here: lca.lcia() But I guess the LCIA Method is not declared correctly: CC_method = [m for m in bd.methods if 'IPCC 2013' in str(m) and 'climate change' in str(m) and 'GWP 100a' in str(m) and not 'no LT' in str(m)][0] CC_method

michaelweinold commented 9 months ago

I tested a little yesterday, but was unable to fix the notebook yet. Please use one of the other notebooks from our teaching repository for the time being: https://github.com/brightway-lca/from-the-ground-up