Forráskód Böngészése

```
feat(customer-template): 添加图片复制时的目录创建功能

在copyImage方法中添加了目录创建逻辑,确保目标路径的目录存在后再进行
图片复制操作,避免因目录不存在导致的复制失败问题。

fix(remove-bg-pixian): 增强错误信息返回内容

在图片处理失败时,错误信息中增加response.content内容,便于调试和
定位问题。
```

rambo 3 hete
szülő
commit
759404dad9

+ 2 - 0
python/service/customer_template_service.py

@@ -313,6 +313,8 @@ class CustomerTemplateService:
             return None
     def copyImage(self,src_path,limit_path):
         try:
+            directory = os.path.dirname(limit_path)
+            self.create_folder(directory)
             print("copyImage 模型图/场景图开始复制",src_path)
             print("copyImage 模型图/场景图开始复制",limit_path)
             shutil.copy(src_path, limit_path)

+ 1 - 1
python/service/remove_bg_pixian.py

@@ -63,7 +63,7 @@ class Segment(object):
                 print("response.status_code:", response.status_code)
                 data = {"im": None,
                         "status_code": "time_out",
-                        "message":"处理失败;{}".format(response.status_code)
+                        "message":"处理失败;{},{}".format(response.status_code,response.content)
                         }
                 return data
         except BaseException as e: