Skip to content

Commit 1a8d238

Browse files
committed
Suppress logging from pyogrio
1 parent 8644dff commit 1a8d238

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Scripts/events/standard_modules/gpkg_results.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def on_iteration_complete(self, iteration: Union[int, str], impedance, gap):
6767
zone_data_df = self.model_system.zdata_forecast.get_zone_data()
6868
try:
6969
import geopandas as gpd
70+
import logging
71+
logging.getLogger("pyogrio").setLevel(logging.ERROR)
72+
7073
except ImportError:
7174
raise ImportError("geopandas is not installed. Please install it to use this feature to export GPKG data.")
7275
zone_gdf = gpd.read_file(self.zone_gpkg_path, layer='polygons')
@@ -82,6 +85,8 @@ def on_daily_results_aggregated(self, assignment_model, day_network):
8285
return
8386
try:
8487
import geopandas as gpd
88+
import logging
89+
logging.getLogger("pyogrio").setLevel(logging.ERROR)
8590
except ImportError:
8691
raise ImportError("geopandas is not installed. Please install it to use this feature to export GPKG data.")
8792
from utils.geodata_helpers import (

0 commit comments

Comments
 (0)