Skip to content

TypeError: backoff.on_exception when running in uvicorn #135

@dj0nes

Description

@dj0nes

Describe the bug
I noticed the following error when trying to use launch darkly in a fastapi project with code reloading:

TypeError: backoff.on_exception applied to a regular function inside coroutine, this will lead to event loop hiccups. Use backoff.on_exception on coroutines in asynchronous code.

The error is thrown from this line in python-server-sdk.

The command to run uvicorn is here in the base image.

To reproduce
I created a simple repo to reproduce the issue.

git clone https://github.com/dj0nes/ldclient-uvicorn-issue.git
docker-compose up

Expected behavior
The application should run without crashing.

SDK version
launchdarkly-server-sdk~=6.11.1

Language version, developer tools
python 3.7

OS/platform
alpine 3.8

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