# Buggy code
def _generate_classification_page_as_list(
    self, taxonomy, classification, filtered_posts, context, kw, lang
):
    """Render a single flat link list with this classification's posts."""
    kind = taxonomy.classification_name
    template_name = taxonomy.template_for_single_list
    output_name = os.path.join(
        self.site.config["OUTPUT_FOLDER"], self.site.path(kind, classification, lang)
    )
    context["lang"] = lang
    context["posts"] = filtered_posts
    context["kind"] = kind
    if "pagekind" not in context:
        context["pagekind"] = ["list", "tag_page"]
    task = self.site.generic_post_list_renderer(
        lang, filtered_posts, output_name, template_name, kw["filters"], context
    )
    task["uptodate"] = task["uptodate"] + [
        utils.config_changed(kw, "nikola.plugins.task.taxonomies:list")
    ]
    task["basename"] = str(self.name)
    yield task

    if (
        taxonomy.generate_atom_feeds_for_post_lists
        and self.site.config["GENERATE_ATOM"]
    ):
        yield self._generate_classification_page_as_list_atom(
            taxonomy, classification, filtered_posts, context, kw, lang
        )


# Traceback (KeyError)
$ nikola build
Traceback (most recent call last):
File "/usr/local/bin/nikola", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/nikola/__main__.py", line 171, in main
_ = DN.run(oargs)
File "/usr/local/lib/python3.5/dist-packages/nikola/__main__.py", line 339, in run
self.nikola.init_plugins()
File "/usr/local/lib/python3.5/dist-packages/nikola/nikola.py", line 1077, in init_plugins
self._activate_plugins_of_category("SignalHandler")
File "/usr/local/lib/python3.5/dist-packages/nikola/nikola.py", line 1233, in _activate_plugins_of_category
plugin_info.plugin_object.set_site(self)
File "/usr/local/lib/python3.5/dist-packages/nikola/plugins/misc/taxonomies_classifier.py", line 328, in set_site
self._register_path_handlers(taxonomy)
File "/usr/local/lib/python3.5/dist-packages/nikola/plugins/misc/taxonomies_classifier.py", line 316, in _register_path_handlers
doc = taxonomy.path_handler_docstrings[name]
KeyError: 'page_index_folder_index'

# Fixed code
def _generate_classification_page_as_list(
    self, taxonomy, classification, filtered_posts, context, kw, lang
):
    """Render a single flat link list with this classification's posts."""
    kind = taxonomy.classification_name
    template_name = taxonomy.template_for_single_list
    output_name = os.path.join(
        self.site.config["OUTPUT_FOLDER"], self.site.path(kind, classification, lang)
    )
    context["lang"] = lang
    # list.tmpl expects a different format than list_post.tmpl (Issue #2701)
    if template_name == "list.tmpl":
        context["items"] = [
            (post.title(), post.permalink(), None) for post in filtered_posts
        ]
    else:
        context["posts"] = filtered_posts
    context["kind"] = kind
    if "pagekind" not in context:
        context["pagekind"] = ["list", "tag_page"]
    task = self.site.generic_post_list_renderer(
        lang, filtered_posts, output_name, template_name, kw["filters"], context
    )
    task["uptodate"] = task["uptodate"] + [
        utils.config_changed(kw, "nikola.plugins.task.taxonomies:list")
    ]
    task["basename"] = str(self.name)
    yield task

    if (
        taxonomy.generate_atom_feeds_for_post_lists
        and self.site.config["GENERATE_ATOM"]
    ):
        yield self._generate_classification_page_as_list_atom(
            taxonomy, classification, filtered_posts, context, kw, lang
        )