-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecursionError when using child component #477
Comments
Thanks for sending so much of your code. Does |
Nope, even by setting the function as an empty one with only Sure CategoryView from django_unicorn.components import UnicornView
from trouve_ton_meme.models import Category, Meme
class CategoryView(UnicornView):
categories = Category.objects.none()
modal_meme = Meme.objects.none()
def mount(self):
self.categories = [Category.objects.get(id=self.request.GET.get('id'))] Full trace of the error
|
@adamghill Do you have any solution for this ? |
@gschurck Unfortunately, I haven't been able to replicate this on my own. The last line
is in |
Hello adamghill, I think I might have a similiar issue, but cannot provide a full example currently. <a unicorn:click.prevent="select_item()" href="#">Click</a>
<!-- mdb-index-info-details-parent.html -->
{% load unicorn %}
<div class="row">
<div class="col-lg-4">
{% unicorn 'mdb-index-info-details-items' %}
</div>
<div class="col-lg-8">
{% unicorn 'mdb-index-info-details-chart' %}
</div>
</div> MdbIndexInfoDetailsItemsView and MdbIndexInfoDetailsChartView are childs of MdbIndexInfoDetailsParentView I noticed that the error disappeared when I removed one of the childs from parent template. |
I think this should be fixed by 0.58.0 of |
I ran into a similar problem. After some digging I was able to set a breakpoint into the faulty callstack:
Turned out that django_redis, uses beautifulsoup4 for serialization, and bs4 relies on some hardcoded delimiter name "Tag": My problem was that my component view contained a variable for a model named Tag, which was serialized as is, without any escaping. This made the whole parsing fail :-O |
@philippe-docourt Thanks for debugging this and figuring out the callstack that triggered it. Any idea of how to stop it from happening? |
There is a Recursion Error with my website.
RecursionError: maximum recursion depth exceeded while calling a Python object
I use a view with a loop that call multiple children
category.html
Children :
meme_card.html
With an onclick that calls a function on the component, to update a value from its parent.
meme_card.py
The function is executed and I have access to the parent, but it crashes after that with a RecursionError from Django unicorn.
I don't really understand where is the recursion here.
Is there any solution for this ?
The text was updated successfully, but these errors were encountered: