Skip to content

ValueError: not enough values to unpack (expected 2, got 1) #697

Closed
@Stephane-Ag

Description

@Stephane-Ag

I keep getting this error when trying to view active jobs when there's at least 1 active job.

It's being caused by this function:

def get_executions(queue, composite_keys: List[str]) -> List[Execution]:
    """Fetch executions in bulk from Redis.
    1. If execution data is not present in Redis, discard the result
    """
    executions = []
    for key in composite_keys:
        job_id, id = key.split(':')
        try:
            executions.append(Execution.fetch(id=id, job_id=job_id, connection=queue.connection))
        except ValueError:
            pass
    return executions

Why is a colon expected to be in the job_id?

I tried adding one to bypass this error but rq explicitly doesn't allow this either and errors out with: ValueError: id must not contain ":"

get_executions seems to have been added in django-rq v3.0 for rq v2.0 but rq v2.0.1 added the no-colon requirement.

How can I solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions