diff --git a/influxdb_client/client/flux_csv_parser.py b/influxdb_client/client/flux_csv_parser.py index 7a73e3f8..65ba5a04 100644 --- a/influxdb_client/client/flux_csv_parser.py +++ b/influxdb_client/client/flux_csv_parser.py @@ -1,6 +1,6 @@ """Parsing response from InfluxDB to FluxStructures or DataFrame.""" - +import asyncio import base64 import codecs import csv as csv_parser @@ -147,6 +147,9 @@ async def _parse_flux_response_async(self): df = self._prepare_data_frame() if not self._is_profiler_table(metadata.table): yield df + except (asyncio.exceptions.CancelledError, asyncio.TimeoutError) as ce: + ce.add_note("Stream cancelled during read. Recommended: Check Influxdb client `timeout` setting.") + raise finally: self._close()