-
Notifications
You must be signed in to change notification settings - Fork 66
Description
What do you want to report?
Hi everyone!
What happened
When a database is exported as an Excel file from AB, it is not possible to import it back.
On the other end, Export/Import with brightway2package format works fine.
I provide a minimal working example database linked here in the 2 formats, but I guess it can be tested with any custom test_db. Mine contains a minimal amount of inputs and outputs, randomly selected.
It does not seem to depend on:
- changing or not changing the name of the files at any point of the export/import sequence
- keeping or deleting the test_db in AB
How to reproduce
Download the zip containing the 2 files OR create a minimal working example test_db in AB, then export it as bw2package and xlsx files.
-
Import the
test_dbbw2package -> it will succeed
Export it astest_db2xlsx -> it will succeed
Try to import thetest_db2xlsx -> it will fail -
Import the original
test_dbxlsx -> it will fail -
Import the
test_dbbw2package -> it will succeed
Export it astest_db2bw2package -> it will succeed
Try to import thetest_db2bw2package -> it will succeed
Software
Ubuntu 24.04.3 LTS
Material
Relevant errors
Extracted 1 worksheets in 0.00 seconds
Applying strategies: 100%|████████████████████| 19/19 [00:00<00:00, 3989.58it/s]
Applying strategy: relink_exchanges_with_db
Applying strategy: relink_exchanges_with_db
Error calling Python override of QThread::run(): 17:30:06 | ERROR | LinkingFailed: ([{'name': '1,2-Dibromoethane', 'amount': 1, 'database': 'biosphere-3.11', 'unit': 'kilogram', 'categories': ('water',), 'type': 'biosphere'}, {'name': 'Merphos', 'amount': 1, 'database': 'biosphere-3.11', 'unit': 'kilogram', 'categories': ('water',), 'type': 'biosphere'}, {'name': 'Sedaxane', 'amount': 1, 'database': 'biosphere-3.11', 'unit': 'kilogram', 'categories': ('water', 'surface water'), 'type': 'biosphere'}], {'biosphere-3.11'})
Traceback (most recent call last):
File "/home/paul-robineau/anaconda3/envs/ab_beta/lib/python3.11/site-packages/activity_browser/ui/core/threading.py", line 42, in run
raise e
File "/home/paul-robineau/anaconda3/envs/ab_beta/lib/python3.11/site-packages/activity_browser/ui/core/threading.py", line 38, in run
self.run_safely(*self._args, **self._kwargs)
File "/home/paul-robineau/anaconda3/envs/ab_beta/lib/python3.11/site-packages/activity_browser/actions/database/database_importer_excel.py", line 139, in run_safely
importer.automated_import(database_name, linking_dict)
File "/home/paul-robineau/anaconda3/envs/ab_beta/lib/python3.11/site-packages/activity_browser/bwutils/importers.py", line 124, in automated_import
raise LinkingFailed(excs, databases)
activity_browser.bwutils.errors.LinkingFailed: ([{'name': '1,2-Dibromoethane', 'amount': 1, 'database': 'biosphere-3.11', 'unit': 'kilogram', 'categories': ('water',), 'type': 'biosphere'}, {'name': 'Merphos', 'amount': 1, 'database': 'biosphere-3.11', 'unit': 'kilogram', 'categories': ('water',), 'type': 'biosphere'}, {'name': 'Sedaxane', 'amount': 1, 'database': 'biosphere-3.11', 'unit': 'kilogram', 'categories': ('water', 'surface water'), 'type': 'biosphere'}], {'biosphere-3.11'})Version
3.0.0b1163
Installation method
Anaconda (conda)
Operating system
Linux/Other (please specify above)