I tried to import brightway2 as usual and it worked but now it does'nt work anymore and get an :
ImportError: cannot import name 'databases'
I didn't change anything, I tried to remove conda and install again but same error...Any ideas?
import brightway2 as bw
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-a3ddbb8a34e8> in <module>
----> 1 import brightway2 as bw
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\brightway2\__init__.py in <module>
1 # -*- coding: utf-8 -*
----> 2 from bw2data import *
3 from bw2calc import *
4 from bw2io import *
5
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\__init__.py in <module>
33 from .project import projects
34 from .utils import set_data_dir
---> 35 from .meta import (
36 dynamic_calculation_setups,
37 calculation_setups,
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\meta.py in <module>
190 preferences = Preferences()
191 weightings = WeightingMeta()
--> 192 calculation_setups = CalculationSetups()
193 dynamic_calculation_setups = DynamicCalculationSetups()
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in __init__(self, dirpath)
120 self.filename
121 )
--> 122 self.load()
123
124 def load(self):
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in load(self)
125 """Load the serialized data. Creates the file if not yet present."""
126 try:
--> 127 self.data = self.deserialize()
128 except IOError:
129 # Create if not present
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in deserialize(self)
238
239 def deserialize(self):
--> 240 return self.unpack(pickle.load(open(self.filepath, "rb")))
241
242
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\backends\__init__.py in <module>
3 from eight import *
4
----> 5 from .base import LCIBackend
6 from .peewee import SQLiteBackend
7 from .json import JSONDatabase
And Something missing ?
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\backends\base.py in <module>
3 from eight import *
4
----> 5 from .. import (
6 config,
7 databases,
ImportError: cannot import name 'databases'
This is a bug, and will be fixed in an upcoming release. For the time being, you need to delete the file:
C:\Documents and Settings\<User>\Application Data\Local Settings\pylca\Brightway3\<default-something>\setups.pickle