rollbar / pyrollbar

Error tracking and logging from Python to Rollbar
https://docs.rollbar.com/docs/python/
MIT License
213 stars 133 forks source link

Issue with comparing FastAPI versions #440

Closed thewymoon closed 8 months ago

thewymoon commented 9 months ago

When using a FastAPI version 0.100.0 or above, we get errors that look like this:

rollbar.contrib.fastapi.utils.FastAPIVersionError: FastAPI 0.41.0+ is required to use add_to() function

By downgrading to something like FastAPI 0.99.1 we stop seeing the error.

Think there is something wrong with the way is_current_version_higher_or_equal is defined: https://github.com/rollbar/pyrollbar/blob/781da552b9c2ce99db3a4024e5e8ebb39c45e689/rollbar/contrib/fastapi/utils.py#L24-L48

danielmorell commented 8 months ago

Hey Wooyoung, this was reported in https://github.com/rollbar/pyrollbar/issues/432, fixed in https://github.com/rollbar/pyrollbar/pull/433, and available in the beta release 1.0.0b1. You can upgrade your Rollbar version with

pip install rollbar==1.0.0b1