mongkok / fastapi-debug-toolbar

A debug toolbar for FastAPI.
https://fastapi-debug-toolbar.domake.io
BSD 3-Clause "New" or "Revised" License
140 stars 14 forks source link

SQLAlchemy panel does not work anymore (TypeError: 'SolvedDependency' object is not subscriptable) #53

Open ddahan opened 2 months ago

ddahan commented 2 months ago

Hi, and first, thanks a lot for this great project.

When adding "debug_toolbar.panels.sqlalchemy.SQLAlchemyPanel" as a panel, all my endpoints are now broken with this error:

  File "/usr/local/lib/python3.12/site-packages/debug_toolbar/dependencies.py", line 25, in get_dependencies
    #             return solved_result.response
                       ^^^^^^^^^^^^^^^^
TypeError: 'SolvedDependency' object is not subscriptable

Investigation

The issue seems to be related to a FastAPI file used, that have has been refactored multiple times lately: https://github.com/fastapi/fastapi/commits/master/fastapi/dependencies/utils.py And the guilty commit could be: https://github.com/fastapi/fastapi/commit/5b7fa3900e3156dcb93f496516740bc06903d7d8

My versions

Thanks!