LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
149 stars 57 forks source link

Sankey loading forever for zero LCA score #155

Closed haasad closed 5 years ago

haasad commented 6 years ago

In some cases, eg. activities from the forwast database and CML 2001 w/o LT, ionising radiation w/o LT, ionising radiation w/o LT method, the LCA score can be zero. If this happens brightway raises an error, but the Sankey window keeps spinning:

Traceback (most recent call last):
  File "/home/adrian/Git/github/AB/activity-browser/activity_browser/app/ui/web/sankey/worker_threads.py", line 16, in run
    res = bw.GraphTraversal().calculate(self.demand, self.method, self.cutoff, self.max_calc)
  File "/home/adrian/miniconda3/envs/abe/lib/python3.6/site-packages/bw2calc/graph_traversal.py", line 46, in calculate
    raise ValueError("Zero total LCA score makes traversal impossible")
ValueError: Zero total LCA score makes traversal impossible

We should add an appropriate warning message to the AB for this case.

bsteubing commented 6 years ago

Implemented for the new Sankey diagram (in the pipeline...)

bsteubing commented 5 years ago

Got a new Sankey diagram implementation now.