kolofordjango / kolo

See everything happening in your running Django app. All without leaving VSCode
https://kolo.app
486 stars 14 forks source link

KeyError: 'cursor' #40

Closed yml closed 1 year ago

yml commented 1 year ago
Unexpected exception in default_include_frames: <kolo.filters.sql.SQLQueryFilter object at 0x7f9677550250>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/kolo/profiler.py", line 173, in __call__
    frame_data = frame_filter.process(
  File "/usr/local/lib/python3.10/site-packages/kolo/filters/sql.py", line 92, in process
    cursor = frame.f_locals["cursor"]
KeyError: 'cursor'
wilhelmklopp commented 1 year ago

@LilyFoote maybe we can fall back to not capturing any query data when the cursor local (or any other locals we rely on) doesn't exist?