Breaking Integration with Locust Tests? Having a hard time debugging

20 views
Skip to first unread message

Theo Chitayat

unread,
Nov 4, 2022, 7:21:59 PM11/4/22
to sqlalchemy

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

Nishant Varma

unread,
Nov 4, 2022, 11:22:55 PM11/4/22
to sqlal...@googlegroups.com
It seems to have something to do with a non-numeric version. What is the SQLAlchemy verson? Check this issue https://github.com/oracle/python-cx_Oracle/issues/27 to see if it connected.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/203e2aaf-0daa-4b97-bed5-beaf59c3b469n%40googlegroups.com.

Simon King

unread,
Nov 7, 2022, 5:09:36 AM11/7/22
to sqlal...@googlegroups.com
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:


You could either install the unreleased version of sqlalchemy-utils, or downgrade SQLAlchemy to a non-beta version.

Hope that helps,

Simon

--
Reply all
Reply to author
Forward
0 new messages