Commit fa6f0278 authored by Niall McDaid's avatar Niall McDaid
Browse files

Handle error for when no curve data

parent 6ff7bb4f
Pipeline #72291 failed with stage
in 1 minute and 8 seconds
......@@ -73,4 +73,5 @@ def welllog_data(url: str,
welllog_data = client.get_welllog_data(welllog_id, curves)
print(welllog_data.to_string())
if welllog_data is not None:
print(welllog_data.to_string())
......@@ -125,7 +125,11 @@ class OsduClient:
get_welllog_data_url = f"{self._base_url}/api/os-wellbore-ddms/ddms/v3/welllogs/{welllog_id}/data?describe=false{curves_query}"
res = self._send_request("GET", get_welllog_data_url, None, None)
try:
res = self._send_request("GET", get_welllog_data_url, None, None)
except LasLoaderWebResponseError as ex:
logger.warning(f"No curve data found. Error: {str(ex)}")
return None
return read_parquet(io.BytesIO(res.content))
def post_log_recognition(self, mnemonic: str, unit: str) -> any:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment