brightway-lca / brightway2-data

Tools for the management of inventory databases and impact assessment methods. Part of the Brightway LCA framework.
https://docs.brightway.dev/
BSD 3-Clause "New" or "Revised" License
8 stars 23 forks source link

AttributeError: 'Config' object has no attribute 'is_test' #154

Closed ccomb closed 1 year ago

ccomb commented 1 year ago

While importing Ecoinvent on bw2data 4.0DEV28:

Traceback (most recent call last):
  File "/home/jovyan/ecobalyse/data/import_ecoinvent.py", line 41, in <module>
    main()
  File "/home/jovyan/ecobalyse/data/import_ecoinvent.py", line 31, in main
    bw2io.bw2setup()
  File "/opt/conda/lib/python3.11/site-packages/bw2io/__init__.py", line 150, in bw2setup
    create_default_biosphere3()
  File "/opt/conda/lib/python3.11/site-packages/bw2io/__init__.py", line 112, in create_default_biosphere3
    eb.write_database(overwrite=overwrite)
  File "/opt/conda/lib/python3.11/site-packages/bw2io/importers/base_lci.py", line 278, in write_database
    db.write(existing, searchable=searchable)
  File "/opt/conda/lib/python3.11/site-packages/bw2data/project.py", line 432, in writable_project
    return wrapped(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/bw2data/backends/base.py", line 525, in write
    self._efficient_write_many_data(data)
  File "/opt/conda/lib/python3.11/site-packages/bw2data/backends/base.py", line 464, in _efficient_write_many_data
    for index, (key, ds) in enumerate(tqdm_wrapper(data.items(), getattr(config, "is_test"))):
                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Config' object has no attribute 'is_test'
ccomb commented 1 year ago

It was fixed in 4.0.DEV24 with #146 but reappears in 4.0.DEV28

ccomb commented 1 year ago

Ok seems fixed in 4.0.dev29 ;-)