We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26f2848 commit b5b8d12Copy full SHA for b5b8d12
taskweaver/ext_role/image_reader/image_reader.py
@@ -28,10 +28,10 @@ def local_image_to_data_url(image_path):
28
with open(image_path, "rb") as image_file:
29
base64_encoded_data = base64.b64encode(image_file.read()).decode("utf-8")
30
except FileNotFoundError:
31
- print(f"Error: The file {image_path} does not exist.")
+ logger.error(f"Error: The file {image_path} does not exist.")
32
return None
33
except IOError:
34
- print(f"Error: The file {image_path} could not be read.")
+ logger.error(f"Error: The file {image_path} could not be read.")
35
36
# Construct the data URL
37
return f"data:{mime_type};base64,{base64_encoded_data}"
0 commit comments