Comments (8)
@TJTapajyoti that's strange! Try create_default_lcia_methods()
?
from brightway2.
It seems you have a new version of xlrd
installed, which does not support xlsx files anymore, see brightway-lca/brightway2-io#86. Can you try to downgrade xlrd
and see if you can then run create_default_lcia_methods()
?
from brightway2.
Hi @TJTapajyoti,
I believe it should be import
, not install
. Also please note that you need to run bw2setup() before any methods will show up. For a beginner guide see https://github.com/BenPortner/brightway_recipes.
Cheers.
Ben
from brightway2.
Hi @BenPortner I redid each and every step in your tutorial. I still got the same problem. On trying the function you mentioned, I am obtaining this error -
create_default_lcia_methods()
Traceback (most recent call last):
File "", line 1, in
create_default_lcia_methods()
File "/Users/tghosh/opt/anaconda3/envs/liason/lib/python3.8/site-packages/bw2io/__init__.py", line 91, in create_default_lcia_methods
ei = EcoinventLCIAImporter()
File "/Users/tghosh/opt/anaconda3/envs/liason/lib/python3.8/site-packages/bw2io/importers/ecoinvent_lcia.py", line 30, in __init__
self.csv_data, self.cf_data, self.units, self.file = convert_lcia_methods_data()
File "/Users/tghosh/opt/anaconda3/envs/liason/lib/python3.8/site-packages/bw2io/data/__init__.py", line 336, in convert_lcia_methods_data
sheet = get_sheet(
File "/Users/tghosh/opt/anaconda3/envs/liason/lib/python3.8/site-packages/bw2io/data/__init__.py", line 40, in get_sheet
wb = xlrd.open_workbook(path)
File "/Users/tghosh/opt/anaconda3/envs/liason/lib/python3.8/site-packages/xlrd/__init__.py", line 170, in open_workbook
raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
XLRDError: Excel xlsx file; not supported
I have a question - are the default LCIA methods inbuilt in brightway2 or obtained from ecoinvent or some other database that I am missing? This seems like its trying to read a excel file that is not supported. Not sure if there is some excel file with all the LCIA methods.
from brightway2.
Just to confirm, I created a new project, ran bwsetup(), loaded ecoinvent(I have version 3.6), applied the strategies,statistics and write_database function. I made sure i am in the correct project. I checked the datasets and processes and they were fine. I defined functional units. Just then I am trying
bw.methods
or for me just methods - as I imported everything from the module of brightway2 - I am getting -
Methods dictionary with 0 objects
I installed brightway 2.1 to check and I am getting the same error.
I am using python 3.8
Should I install brightway2 using pip or use conda install from cmutel?
from brightway2.
Hi @BenPortner so this interesting. I looked into the projects i had in my brightway2 and there were some old projects ( which remained even though I uninstalled and reinstalled brightway2) but when I am setting my current project as BW2intro or StepByStep, I have all the LCIA methods available.
projects.set_current("BW2intro")
bw.methods
Out[27]:
Methods dictionary with 850 objects, including:
('CML 2001 (obsolete)', 'acidification potential', 'average European')
('CML 2001 (obsolete)', 'acidification potential', 'generic')
('CML 2001 (obsolete)', 'climate change', 'GWP 100a')
('CML 2001 (obsolete)', 'climate change', 'GWP 20a')
('CML 2001 (obsolete)', 'climate change', 'GWP 500a')
('CML 2001 (obsolete)', 'climate change', 'lower limit of net GWP')
('CML 2001 (obsolete)', 'climate change', 'upper limit of net GWP')
('CML 2001 (obsolete)', 'eutrophication potential', 'average European')
('CML 2001 (obsolete)', 'eutrophication potential', 'generic')
('CML 2001 (obsolete)', 'freshwater aquatic ecotoxicity', 'FAETP 100a')
Use `list(this object)` to get the complete list.
from brightway2.
@BenPortner Thanks so much for solving my issue. This works fine. create_default_lcia_methods()
had to downgrade xlrd
from brightway2.
@TJTapajyoti I'm glad it worked π Please also run create_core_migrations()
to complete the setup.
Happy brightway coding!
from brightway2.
Related Issues (20)
- bw2io.errors.MultiprocessingError HOT 1
- Ecospold2 importer issue with versions 2.1, 2.2, 2.4 (ecoinvent 3.6 and ecoinvent 3.8) HOT 1
- Unable to clone repository due to invalid path (possibly forbidden character (?) in file name)
- Brightway tutorial not working on fresh install HOT 3
- Unable to create new project. "IntegrityError: NOT NULL constraint failed: projectdataset.full_hash" HOT 6
- numpy.bool is deprecated and is removed from numpy-1.24.x HOT 1
- Trying to create activity parameters through imports of databases
- Biosphere exchange in- and outputs wrong way around with ecoinvent 3.9.1? HOT 1
- Importing ILCD-EPDs from Γkobaudat
- Export inventory results from uncertainty analysis
- Top activities not working for upstream exploration of hotspots HOT 1
- LeastSquaresLCA throwing NonsquareTechnoSphere
- Wrong units for ReCiPe endpoint categories
- I cannot install brightway 2 with anaconda HOT 3
- how to use brightway 2 to import lcia file. {http://www.EcoInvent.org/EcoSpold02}impactIndicator raise ValueError ValueError
- cannot install the brightway 2 in anaconda
- Cannot import brightway2 in Jupyter notebook HOT 3
- ExcelImporter write_database issue
- Trace back error
- Import of cumulative LCIA results
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.