makeplane/plane · error · CommandError

Workspace slug is required

Error message

Workspace slug is required

What it means

Raised by `fix_duplicate_sequences` when the `input("Workspace slug: ")` prompt returns an empty string (lines 28-31). This raise happens BEFORE the try block (try starts at line 40), so it propagates as a true non-zero CommandError.

Source

Thrown at apps/api/plane/db/management/commands/fix_duplicate_sequences.py:31


class Command(BaseCommand):
    help = "Fix duplicate sequences"

    def add_arguments(self, parser):
        # Positional argument
        parser.add_argument("issue_identifier", type=str, help="Issue Identifier")

    def strict_str_to_int(self, s):
        if not s.isdigit() and not (s.startswith("-") and s[1:].isdigit()):
            raise ValueError("Invalid integer string")
        return int(s)

    def handle(self, *args, **options):
        workspace_slug = input("Workspace slug: ")

        if not workspace_slug:
            raise CommandError("Workspace slug is required")

        issue_identifier = options.get("issue_identifier", False)

        # Validate issue_identifier
        if not issue_identifier:
            raise CommandError("Issue identifier is required")

        # Validate issue identifier
        try:
            identifier = issue_identifier.split("-")

            if len(identifier) != 2:
                raise ValueError("Invalid issue identifier format")

            project_identifier = identifier[0]
            issue_sequence = self.strict_str_to_int(identifier[1])

            # Fetch the project

View on GitHub (pinned to 1c8a60f858)

Solutions

  1. Type the workspace slug at the prompt.
  2. Pipe the slug via stdin: `echo 'my-workspace' | python manage.py fix_duplicate_sequences PLANE-42`.
  3. Confirm the slug exists: `Workspace.objects.filter(slug=...).exists()`.

Example fix

# before
$ python manage.py fix_duplicate_sequences PLANE-42
Workspace slug: <Enter>          # empty
# after
$ echo my-workspace | python manage.py fix_duplicate_sequences PLANE-42
Defensive patterns

Strategy: validation

Validate before calling

# Provide the slug non-interactively by piping stdin:
# echo 'my-workspace' | python manage.py fix_duplicate_sequences PLANE-42
slug = 'my-workspace'
assert slug and slug.strip(), 'workspace slug required'

Type guard

def is_non_empty_slug(value: str) -> bool:
    return isinstance(value, str) and bool(value.strip())

Try / catch

try:
    call_command('fix_duplicate_sequences', 'PLANE-42', stdin=StringIO('my-workspace\n'))
except CommandError as e:
    if 'Workspace slug is required' in str(e):
        ...

Prevention

When it happens

Trigger: Running the command and pressing Enter at the 'Workspace slug: ' prompt without typing anything.

Common situations: Accidental empty Enter; scripting the command without piping a slug to stdin.

Related errors


AI-assisted analysis of makeplane/plane@1c8a60f858 (2026-08-12). Data as JSON: /api/errors/62953b0098b09340. Report an issue: GitHub.