Open Regalis opened 8 years ago
The problem is not in the pelican_comment_system. If you use following example plugin in combination with the i18n_subsites plugin you will get the same error.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from pelican import signals
def pelican_initialized(pelican):
pelican.get_writer()
print("testplugin init")
def register():
signals.initialized.connect(pelican_initialized)
The Problem is that the i18n_subsites plugin assumes, that the get_writer
signal does only get emitted once per pelican run (if I understand the plugin correctly).[1]
But the Pelican::get_writer
[2] method (which emits this signal) is part of the public interface of an pelican object and therefore can be called more than once (e.g. in plugins).
Therefore the get_writer
signal may be emitted multiple times.
cc: @smartass101
Acknowledged. Either we could use a different signal (if such signal exists) or test if this is the 1. call of the signal.Any other suggestions?
Seems the all_generators_finalized signal might be a good candidate. It's called almost at the same time and is part of the run
method. This signal was apparently added after the creation of this plugin.
@smartass101: Any chance you could work on implementing a solution for this?
Not in the immediate future, but I think this could be an easy first issues for someone.
Hi,
I'm getting
RecursionError: maximum recursion depth exceeded while calling a Python object
while using pelican_comment_system with i18n_subsites.Steps to reproduce:
Attachments:
make DEBUG=1 html
@Scheirle
[Edit] Temporary workaround:
pelican_writer
initialization: