Comments (1)
Some update:
By looking at the code, it seems like the init of the ExcelLCIAImporter class in the excel_lcia.py prevents or cancels the init of the LCIAImporter class in the base_lcia.py.
The LCIAImporter class init in base_lcia.py:
class LCIAImporter(ImportBase):
def __init__(self, filepath, biosphere=None):
print("init yup")
self.applied_strategies = []
self.filepath = filepath
self.biosphere_name = biosphere or config.biosphere
if self.biosphere_name not in databases:
raise ValueError(
"Can't find biosphere database {}".format(self.biosphere_name)
)
self.strategies = [
# [...] the code continues
The excel_lcia.py import the LCIAImporter class, so biosphere_name should be ok, but then we have the ExcelLCIAImporter class init :
class ExcelLCIAImporter(LCIAImporter):
# [...] Some code commmentaries
format = "Excel"
extractor = ExcelExtractor
def __init__(self, filepath, name, description, unit, **metadata):
assert isinstance(name, tuple)
super(ExcelLCIAImporter, self).__init__(filepath, biosphere=None)
self.strategies = [
# [...] the code continues
The line super(ExcelLCIAImporter, self).__init__(filepath, biosphere=None)
was added on our side after looking at the structure of the init of the SimaProLCIACSVImporter class, which contains an analog line, which gave the idea. When it's added, the AttributeError on biosphere_name of the ExcelLCIAImporter disappears.
Not sure if it's the proper way to fix the issue, but hope it helps!
from brightway2-io.
Related Issues (20)
- How to export database with location information of technosphere HOT 1
- [BW2 Legacy] Using older versions of Biosphere HOT 2
- database writing failed due to unlinked exchanges in ecoinvent 3.10 HOT 4
- Some extractor methods do not have the `use_mp` flag implemented, causing them to fail. HOT 1
- [BW2 legacy] Error with easy ecoinvent biosphere flows/LCI/LCIA import of bw2io version 0.8.11 HOT 3
- SimaPro CSV importer doesn't fix broken uncertainty values HOT 8
- US EEIO import is broken
- [Discussion/Feature request] Adding `database` field to Linking Iterables by field on import HOT 2
- Excel file import - AttributeError: 'int' object has no attribute 'lower' HOT 1
- Few type hints not compatible with python 3.9 & python 3.8 HOT 1
- Encoding erorr when running `import_ecoinvent_release` on `v3.10` HOT 3
- Backport fix for "chemical formulas" from 0.9.DEV7 to 0.8.X ? HOT 1
- Importing in BW processes written in SP HOT 2
- errors importing exiobase in monetary units HOT 1
- KeyError in IOTable backend HOT 2
- update README to use cookiecutterlib format
- Configurable multiprocessing for large data import (Ecoinvent ecospold2) HOT 2
- `ExcelImporter` should convert integer codes to strings HOT 5
- minor compatibility issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brightway2-io.