diff --git a/src/datajoint/autopopulate.py b/src/datajoint/autopopulate.py index c1a6ce510..02193f496 100644 --- a/src/datajoint/autopopulate.py +++ b/src/datajoint/autopopulate.py @@ -525,7 +525,8 @@ def handler(signum, frame): else: # spawn multiple processes self.connection.close() - del self.connection._conn.ctx # SSLContext is not pickleable + if hasattr(self.connection._conn, "ctx"): + del self.connection._conn.ctx # SSLContext is not pickleable with ( mp.Pool(processes, _initialize_populate, (self, self.jobs, populate_kwargs)) as pool, tqdm(desc="Processes: ", total=nkeys)