Closed lane-to closed 2 years ago
Thanks @lane-to for the post!
The culprit is repeat importing, specially this line:
from systems import price_dct
When doing this, Python runs systems.py (in order to import price_dct
), but later, you also have:
systems = br.systems
sys_dct = systems.sys_dct
price_dct = systems.price_dct
GWP_dct = systems.GWP_dct
GWP = systems.GWP
And Python needs to run systems.py again, thus all the objects are recreated.
Taking out that from systems import price_dct
line should let all the warnings go away, but you also have a lot of other imported but not used modules/objects (Spyder flags them with the yellow triangle with an exclamation mark inside)
You can take out all the modules that Spyder flags, so (with minor modifications to consolidate the codes)
from exposan import biogenic_refinery as br
import pandas as pd
from chaospy import distributions as shape
import biosteam as bst
from biosteam.evaluation import Model
from qsdsan.utils import load_data, data_path
from qsdsan import ImpactItem
systems = br.systems
m = br.models
sys_dct = systems.sys_dct
price_dct = systems.price_dct
GWP_dct = systems.GWP_dct
GWP = systems.GWP
In fact, because you've pulled in some of the new changes in QSDsan, you actually do:
from exposan import biogenic_refinery as br
import pandas as pd
from chaospy import distributions as shape
from qsdsan.utils import load_data, data_path
from qsdsan import ImpactItem, PowerUtility, Model
systems = br.systems
m = br.models
sys_dct = systems.sys_dct
price_dct = systems.price_dct
GWP_dct = systems.GWP_dct
GWP = systems.GWP
Hope this helps, feel free to close this issue if this solves your problem, or let me know if you run into further problems!
Closing it since it's fixed
see attached screenshots