The stack trace shows that the exception is being raised in sqlalchemy_utils/types/uuid.py. Looking at sqlalchemy_utils on Github, this is a bug that has been reported and fixed, but the fix hasn't been released yet:
https://github.com/kvesteri/sqlalchemy-utils/pull/643 You could either install the unreleased version of sqlalchemy-utils, or downgrade SQLAlchemy to a non-beta version. Hope that helps, Simon On Fri, Nov 4, 2022 at 11:22 PM 'Theo Chitayat' via sqlalchemy < sqlalchemy@googlegroups.com> wrote: > I have a model that uses ChoiceType like an enum for my FastAPI app. As > soon as I install *locust* from pip, i get errors like this: > *from sqlalchemy_utils import ChoiceType File > "/Users/theo/.local/share/virtualenvs/optis2-data-service-iqC41Vso/lib/python3.9/site-packages/sqlalchemy_utils/__init__.py", > line 59, in <module> from .types import ( # noqa File > "/Users/theo/.local/share/virtualenvs/optis2-data-service-iqC41Vso/lib/python3.9/site-packages/sqlalchemy_utils/types/__init__.py", > line 42, in <module> from .uuid import UUIDType # noqa File > "/Users/theo/.local/share/virtualenvs/optis2-data-service-iqC41Vso/lib/python3.9/site-packages/sqlalchemy_utils/types/uuid.py", > line 8, in <module> sqlalchemy_version = tuple([int(v) for v in > __version__.split(".")]) File > "/Users/theo/.local/share/virtualenvs/optis2-data-service-iqC41Vso/lib/python3.9/site-packages/sqlalchemy_utils/types/uuid.py", > line 8, in <listcomp> sqlalchemy_version = tuple([int(v) for v in > __version__.split(".")]) ValueError: invalid literal for int() with base > 10: '0b2'* > > I've tried a number of trial and error changes - but I have no idea where > this error stems from. Is there anything I can do to support this? > > Thanks in advance > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy/203e2aaf-0daa-4b97-bed5-beaf59c3b469n%40googlegroups.com > <https://groups.google.com/d/msgid/sqlalchemy/203e2aaf-0daa-4b97-bed5-beaf59c3b469n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/CAFHwexdtCZYgWKwYT5uxVZVOKZz%3DLjwbJd7cME2jZP_H5X-11Q%40mail.gmail.com.