浏览代码

FIX issue 462, nargs error (#547)

Han 1 年之前
父节点
当前提交
e44661aca4
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      rembg/commands/b_command.py
  2. 1 1
      rembg/commands/i_command.py
  3. 1 1
      rembg/commands/p_command.py

+ 1 - 1
rembg/commands/b_command.py

@@ -74,7 +74,7 @@ from ..sessions import sessions_names
 @click.option(
     "-bgc",
     "--bgcolor",
-    default=None,
+    default=(0, 0, 0, 0),
     type=(int, int, int, int),
     nargs=4,
     help="Background color (R G B A) to replace the removed background with",

+ 1 - 1
rembg/commands/i_command.py

@@ -70,7 +70,7 @@ from ..sessions import sessions_names
 @click.option(
     "-bgc",
     "--bgcolor",
-    default=None,
+    default=(0, 0, 0, 0),
     type=(int, int, int, int),
     nargs=4,
     help="Background color (R G B A) to replace the removed background with",

+ 1 - 1
rembg/commands/p_command.py

@@ -83,7 +83,7 @@ from ..sessions import sessions_names
 @click.option(
     "-bgc",
     "--bgcolor",
-    default=None,
+    default=(0, 0, 0, 0),
     type=(int, int, int, int),
     nargs=4,
     help="Background color (R G B A) to replace the removed background with",