Skip to content

Running the fastapi/empty_agent.py sample results in a 500 error #241

Description

@matthiasblondeel

I'm running the sample fastapi/empty_agent.py using python 3.12 on windows
I am getting the following errors:

Traceback (most recent call last):
File "C:\project\src.venv\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 409, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\project\src.venv\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\project\src.venv\Lib\site-packages\fastapi\applications.py", line 1134, in call
await super().call(scope, receive, send)
File "C:\project\src.venv\Lib\site-packages\starlette\applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "C:\project\src.venv\Lib\site-packages\starlette\middleware\errors.py", line 186, in call
raise exc
File "C:\project\src.venv\Lib\site-packages\starlette\middleware\errors.py", line 164, in call
await self.app(scope, receive, _send)
File "C:\project\src.venv\Lib\site-packages\microsoft_agents\hosting\fastapi\jwt_authorization_middleware.py", line 67, in call
await token_validator.get_anonymous_claims()
TypeError: object ClaimsIdentity can't be used in 'await' expression

I have the following versions of packages installed:
microsoft-agents-activity==0.6.0.dev11
microsoft-agents-authentication-msal==0.6.0.dev11
microsoft-agents-hosting-aiohttp==0.6.0.dev11
microsoft-agents-hosting-core==0.6.0.dev11
microsoft-agents-hosting-fastapi==0.6.0.dev11
microsoft-agents-hosting-teams==0.6.0.dev11

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