Open amoodie opened 2 years ago
on the try-except
for run()
on the ParallelJob
, could add something like
if isinstance(e, FileExistsError):
raise FileExistsError(
'File already exists in trying to run parallel '
'jobs. Did you mean to set `defer_output=True` '
'in your job configuration? '
f'Original error is: {e}')
Creating a custom subclass and using the preprocessor is complicated. Mostly, because creating the netcdf file has to be delayed until the job is assigned to a different thread (connection to netcdf is not pickle-able).
So, when you get the error
which is raised from here but actually called during the
run
command for the parallel job, and delivered to the user here on error, it can be pretty confusing.I was tripped up because I forgot to pass
**kwargs
input to the subclass model, on to__init__
for theDeltaModel
.Two ways to help this:
defer_output=True
during creating parallel jobs, and so emphasizing again "Are you sure you passed **kwargs toDeltaModel
instantiation in your subclass?"