diff --git a/src/highdicom/image.py b/src/highdicom/image.py index cba8df8e..9cacf2e0 100644 --- a/src/highdicom/image.py +++ b/src/highdicom/image.py @@ -2274,7 +2274,7 @@ def _generate_temp_tables( # it does seem to happen when interactive REPLs such as ipython # handle errors within the context manager query = ( - "SELECT COUNT(*) FROM sqlite_schema " + "SELECT COUNT(*) FROM sqlite_master " f"WHERE type = 'table' AND name = '{tdef.table_name}'" ) result = next(self._db_con.execute(query))[0]