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

Feat/ecoinvent interface #16

Merged
merged 16 commits into from
Jul 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions activity_browser/ui/wizards/db_import_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import zipfile
from pathlib import Path

import bw2data.errors
import ecoinvent_interface
import requests
from bw2io import BW2Package, SingleOutputEcospold2Importer
Expand Down Expand Up @@ -880,14 +881,14 @@ def run_import(self, import_dir: Path) -> None:
signal=import_signals.strategy_progress,
)
importer.apply_strategies()
importer.write_database(backend="activitybrowser")
importer.write_database(backend="sqlite")
if not import_signals.cancel_sentinel:
import_signals.finished.emit()
else:
self.delete_canceled_db()
except errors.ImportCanceledError:
self.delete_canceled_db()
except errors.InvalidExchange:
except bw2data.errors.InvalidExchange:
# Likely caused by new version of ecoinvent not finding required
# biosphere flows.
self.delete_canceled_db()
Expand Down