-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Bugfix for issue #910 raises error with pandas DataFrame objects #1053
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
Comments
To clarify:
Not pretty, but works for us. |
Just ran into the same issue, and I am not using a local version of toolbar which makes patching this a little harder.. (didn't look into monkeypatching it though) 👍 for me on this issue. |
Running into the same issue on a pandas-heavy project.
Edited source like @anotherzo suggested and it is working for now. |
While I no longer have to edit the source with the latest update, I still periodically encounter this error. |
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 :) .
The text was updated successfully, but these errors were encountered: