diff --git a/quackosm/pbf_file_reader.py b/quackosm/pbf_file_reader.py index 689259a..3f43b10 100644 --- a/quackosm/pbf_file_reader.py +++ b/quackosm/pbf_file_reader.py @@ -1112,7 +1112,7 @@ def _generate_result_file_path( if self.tags_filter is not None: keep_all_tags_part = "" if not keep_all_tags else "_alltags" h = hashlib.new("sha256") - h.update((json.dumps(self.tags_filter) + str(self.custom_sql_filter)).encode()) + h.update((json.dumps(self.tags_filter) + str(self.custom_sql_filter or "")).encode()) osm_filter_tags_hash_part = f"{h.hexdigest()}{keep_all_tags_part}" clipping_geometry_hash_part = self._generate_geometry_hash() @@ -1144,7 +1144,7 @@ def _generate_result_file_path_from_geometry( if self.tags_filter is not None: keep_all_tags_part = "" if not keep_all_tags else "_alltags" h = hashlib.new("sha256") - h.update((json.dumps(self.tags_filter) + str(self.custom_sql_filter)).encode()) + h.update((json.dumps(self.tags_filter) + str(self.custom_sql_filter or "")).encode()) osm_filter_tags_hash_part = f"{h.hexdigest()}{keep_all_tags_part}" clipping_geometry_hash_part = self._generate_geometry_hash()