Alwrity - Bug fixes
This commit is contained in:
@@ -109,7 +109,7 @@ def save_blog_to_file(blog_content, blog_title, blog_meta_desc, blog_tags, blog_
|
||||
|
||||
# Write to the file
|
||||
try:
|
||||
with open(blog_output_path, "w") as f:
|
||||
with open(blog_output_path, "w", encoding="utf-8") as f:
|
||||
f.write(blog_frontmatter)
|
||||
f.write(blog_content)
|
||||
except Exception as e:
|
||||
|
||||
@@ -19,7 +19,7 @@ def save_generated_image(img_generation_response, image_dir):
|
||||
try:
|
||||
response = requests.get(generated_image_url, stream=True)
|
||||
response.raise_for_status()
|
||||
with open(generated_image_filepath, "wb") as image_file:
|
||||
with open(generated_image_filepath, "wb", encoding="utf-8") as image_file:
|
||||
image_file.write(response.content)
|
||||
except requests.exceptions.RequestException as e:
|
||||
logger.error(f"Failed to get generated image content: {e}")
|
||||
|
||||
Reference in New Issue
Block a user