Open pjamesjoyce opened 6 years ago
Indeed this is due to presamples
, and this is a problem I've had too (but failed to report - thanks).
The problem database, campaigns.bd
, is a SubstitutableDatabase
instance. SubstitutableDatabase
is defined by @cmutel in bw2data here, and is used in Brightway2 without any problems (e.g. for the ProjectManager and the ParameterManager).
So what needs to be done is figure out why this substitutable database stays connected. Its a peewee question I haven't had time to look into yet, and will gladly accept any fix.
I think presamples is a red herring - it looks like Windows won't let you delete a file is another process has an open file handle. The key is in the error message: The process cannot access the file because it is being used by another process
. Any chance that another notebook or ipython process is using the same project? I can't open my Windows VM to test this, but it isn't a problem on *nix (though perhaps it should be...)
and
fail with error:
I think campaigns are a
presamples
thing right?Shutting down all running instances of brightway and restarting a fresh brightway instance allows you to delete/purge project directories. But deleting only works if its the first command you use in a new brightway session
Steps to reproduce: