Skip to content

Commit b5b8d12

Browse files
liqulCopilot
andauthored
Update taskweaver/ext_role/image_reader/image_reader.py
Co-authored-by: Copilot <[email protected]>
1 parent 26f2848 commit b5b8d12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

taskweaver/ext_role/image_reader/image_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def local_image_to_data_url(image_path):
2828
with open(image_path, "rb") as image_file:
2929
base64_encoded_data = base64.b64encode(image_file.read()).decode("utf-8")
3030
except FileNotFoundError:
31-
print(f"Error: The file {image_path} does not exist.")
31+
logger.error(f"Error: The file {image_path} does not exist.")
3232
return None
3333
except IOError:
34-
print(f"Error: The file {image_path} could not be read.")
34+
logger.error(f"Error: The file {image_path} could not be read.")
3535
return None
3636
# Construct the data URL
3737
return f"data:{mime_type};base64,{base64_encoded_data}"

0 commit comments

Comments
 (0)