Skip to content

Presamples CF package fails if biosphere flows not used in database #49

@cmutel

Description

@cmutel

It is difficult to impossible to tell ahead of time which flows a given database will use, so instead of raising a mysterious error, we need to just ignore these flows. The error I get now is:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-87-59955be80c45> in <module>()
      1 mc_with = bw.MonteCarloLCA(fu, lcia_method, presamples=[path])
----> 2 mc_with_results = np.array([next(mc_with) for _ in range(250)])

...

~/miniconda3/envs/regional/lib/python3.6/site-packages/scipy/sparse/compressed.py in check_bounds(indices, bound)
    700             if idx >= bound:
    701                 raise IndexError('index (%d) out of range (>= %d)' %
--> 702                                  (idx, bound))
    703             idx = indices.min()
    704             if idx < -bound:

IndexError: index (4294967295) out of range (>= 2077)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions