Re: [sqlalchemy] Breaking Integration with Locust Tests? Having a hard time debugging

2022-11-07 Thread Simon King
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  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  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  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  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
> 
> .
>

-- 
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.


Re: [sqlalchemy] Breaking Integration with Locust Tests? Having a hard time debugging

2022-11-04 Thread Nishant Varma
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.

On Sat, Nov 5, 2022, 4:52 AM '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  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  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  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  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
> 
> .
>

-- 
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/CAPy-swOWJLGiVFKqYq6ioPseyEfeAF9utNckWTMvz7Cj3Zu0-A%40mail.gmail.com.


[sqlalchemy] Breaking Integration with Locust Tests? Having a hard time debugging

2022-11-04 Thread 'Theo Chitayat' via 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  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  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  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  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.