Browse Source

FIX issue 462, nargs error (#547)

Han 1 year ago
parent
commit
e44661aca4
3 changed files with 3 additions and 3 deletions
  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(
 @click.option(
     "-bgc",
     "-bgc",
     "--bgcolor",
     "--bgcolor",
-    default=None,
+    default=(0, 0, 0, 0),
     type=(int, int, int, int),
     type=(int, int, int, int),
     nargs=4,
     nargs=4,
     help="Background color (R G B A) to replace the removed background with",
     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(
 @click.option(
     "-bgc",
     "-bgc",
     "--bgcolor",
     "--bgcolor",
-    default=None,
+    default=(0, 0, 0, 0),
     type=(int, int, int, int),
     type=(int, int, int, int),
     nargs=4,
     nargs=4,
     help="Background color (R G B A) to replace the removed background with",
     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(
 @click.option(
     "-bgc",
     "-bgc",
     "--bgcolor",
     "--bgcolor",
-    default=None,
+    default=(0, 0, 0, 0),
     type=(int, int, int, int),
     type=(int, int, int, int),
     nargs=4,
     nargs=4,
     help="Background color (R G B A) to replace the removed background with",
     help="Background color (R G B A) to replace the removed background with",