Skip to content

Bugfix for issue #910 raises error with pandas DataFrame objects #1053

Open
@anotherzo

Description

@anotherzo

We are using debug-toolbar in a django project where we have DataFrame objects of pandas as items in the context_layer.

The pseudo cache code added to panel.py (e.g., around lines 97ff) breaks with DataFrame objects in context_layer.items(), because the 'if key_values in self.seen_layers' requires a comparison of key_values with all items in seen_layers, but DataFrame objects are not always so easy to compare without throwing an error.

Right now, we simply put a try-except statement in our local panel.py file(s), but it would be better to have a real patch in the django-debug-toolbar code for rollouts. I realize you could argue this is a pandas problem and not a debug-toolbar problem, but it still would be great for us to have some exception handling so Pandas does not simply kill the toolbar code.

Besides, thanks for this tool. We love it :) .

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