makeplane/plane · error · CommandError
Issue identifier is required
Error message
Issue identifier is required
What it means
Raised by `fix_duplicate_sequences` when `issue_identifier` is falsy (lines 33-37). Because `issue_identifier` is a required positional argument (line 20), argparse rejects a missing value first, so this branch is only reachable via programmatic invocation (`call_command`) with a falsy value. The raise is before the try block, so it is a true CommandError.
Source
Thrown at apps/api/plane/db/management/commands/fix_duplicate_sequences.py:37
# 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
project = Project.objects.get(identifier__iexact=project_identifier, workspace__slug=workspace_slug)
# Get the issues
issues = Issue.objects.filter(project=project, sequence_id=issue_sequence)
# Check if there are duplicate issues
if not issues.count() > 1:View on GitHub (pinned to 1c8a60f858)
Solutions
- Invoke via CLI with the identifier: `python manage.py fix_duplicate_sequences PLANE-42`.
- If calling programmatically, pass a non-empty `PROJECT-N` string.
- Add a guard in your wrapper before invoking.
Example fix
# before
call_command('fix_duplicate_sequences', issue_identifier='')
# after
call_command('fix_duplicate_sequences', issue_identifier='PLANE-42') Defensive patterns
Strategy: validation
Validate before calling
import sys
issue_identifier = '' # from your script
if not issue_identifier:
sys.exit('issue_identifier is required') Type guard
def is_valid_issue_identifier(value: str) -> bool:
return isinstance(value, str) and value.count('-') == 1 and value.split('-')[1].isdigit() Try / catch
try:
call_command('fix_duplicate_sequences', issue_identifier)
except CommandError as e:
if 'is required' in str(e):
# programmatic invocation passed an empty identifier
... Prevention
- Invoke via CLI so argparse enforces the positional.
- Validate non-empty + format in wrapper scripts.
- Confirm the identifier matches a real issue sequence.
When it happens
Trigger: Calling `call_command('fix_duplicate_sequences', issue_identifier=None)` or `''`; otherwise argparse blocks the invocation.
Common situations: Wrapper scripts/tests that pass an empty identifier programmatically.
Related errors
- Please provide the email of the admin.
- Error: Workspace slug is required
- Error: Email is required
- User email is required and should have signed in plane
- User with the provided email does not exist.
AI-assisted analysis of makeplane/plane@1c8a60f858 (2026-08-12).
Data as JSON: /api/errors/a55c114d188700d3.
Report an issue: GitHub.