Skip to content

UnboundLocalError: local variable 'k'  #1

Description

@BlogBlocks

lines 63 and 64 need to be indented to match self (in the line above) to prevent the error:

UnboundLocalError: local variable 'k' referenced before assignment

62        self._add_to_corpus(parsed, key, k, next_key)
63        if k == len(parsed) - 3 and next_key is None:
64               next_key = (parsed[k + 1], parsed[k + 2])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions