thouska / spotpy

A Statistical Parameter Optimization Tool
https://spotpy.readthedocs.io/en/latest/
MIT License
247 stars 149 forks source link

AttributeError("{} is not a member of spotpy.database") #320

Closed defreitasL closed 4 months ago

defreitasL commented 4 months ago

Hi everyone,

I'm trying to integrate Spotpy to calibrate some models I have in a Qt app. The problem is that when I use pyinstaller to create an executable, I get the error "AttributeError("{} is not a member of spotpy.database")". It always works when I run the script normally.

I've tried different algorithms, but I get the same error. Here is an example of how I call the sampler function:


self.sampler = spt.algorithms.NSGAII(
                    spot_setup=self, dbname="results", save_sim=True, dbformat='csv'
                    )
self.sampler.sample(
                    self.model_obj.generations,
                    n_obj=self.model_obj.n_obj,
                    n_pop=self.model_obj.n_pop
                    )

Do you know what this could be?