🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
update: optimized code.
Stitch-z22d509419708
diff --git a/metagpt/actions/invoice_ocr.py b/metagpt/actions/invoice_ocr.pyindex 2532543d9..b37aa6885 100644--- a/metagpt/actions/invoice_ocr.py+++ b/metagpt/actions/invoice_ocr.py@@ -71,9 +71,8 @@ class InvoiceOCR(Action):# Use CP437 to encode the file name, and then use GBK decoding to prevent Chinese garbled coderelative_name = Path(zip_info.filename.encode("cp437").decode("gbk"))if relative_name.suffix:- name = relative_name.namefull_filename = file_directory / relative_name- await File.write(full_filename.parent, name, zip_ref.read(zip_info.filename))+ await File.write(full_filename.parent, relative_name.name, zip_ref.read(zip_info.filename))logger.info(f"unzip_path: {file_directory}")return file_directory