Breaking Integration with Locust Tests? Having a hard time debugging

瀏覽次數:20 次
跳到第一則未讀訊息

Theo Chitayat

未讀,
2022年11月4日 晚上7:21:592022/11/4
收件者: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

未讀,
2022年11月4日 晚上11:22:552022/11/4
收件者: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

未讀,
2022年11月7日 清晨5:09:362022/11/7
收件者: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

--
回覆所有人
回覆作者
轉寄
0 則新訊息