Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlAlchemy > 2.0 not working #15

Closed
Jopie01 opened this issue May 23, 2023 · 2 comments
Closed

sqlAlchemy > 2.0 not working #15

Jopie01 opened this issue May 23, 2023 · 2 comments
Assignees

Comments

@Jopie01
Copy link

Jopie01 commented May 23, 2023

I did a pip install sqlalchemy which installed sqlAlchemy 2.0.15 but using this version, I got a lot of errors like Error while executing SQL command: ObjectNotExecutableError() or AttributeError("'Engine' object has no attribute 'execute'"). Searching the internet I came across https://stackoverflow.com/questions/69490450/objectnotexecutableerror-when-executing-any-sql-query-using-asyncengine which is not direct related, but I downgraded to the latest 1.4 version and now it works.

@zod076
Copy link

zod076 commented Mar 4, 2024

I've the same issue but with version 1.0.14 on FreeBSD 14

pkg info py310-sqlalchemy10-1.0.14

py310-sqlalchemy10-1.0.14
Name : py310-sqlalchemy10
Version : 1.0.14
Installed on : Thu Feb 29 23:36:02 2024 +08
Origin : databases/py-sqlalchemy10
Architecture : FreeBSD:14:amd64
Prefix : /usr/local
Categories : python databases
Licenses : MIT
Maintainer : m.tsatsenko@gmail.com
WWW : https://www.sqlalchemy.org/
Comment : Python SQL toolkit and Object Relational Mapper 1.0.x
Options :
DOCS : off
EXAMPLES : off
MSSQL : off
PGSQL : off
SQLITE : on
Annotations :
FreeBSD_version: 1400097
cpe : cpe:2.3:a:sqlalchemy:sqlalchemy:1.0.14:::::freebsd14:x64
flavor : py310
Flat size : 9.91MiB
Description :
The Python SQL Toolkit and Object Relational Mapper

python3 -V

Python 3.10.13

python3 /opt/iredapd/iredapd.py

/opt/iredapd/iredapd.py:6: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
import asyncore
Traceback (most recent call last):
File "/opt/iredapd/iredapd.py", line 20, in
from libs import version, daemon, utils
File "/opt/iRedAPD-5.3.3/libs/utils.py", line 18, in
from sqlalchemy import create_engine
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/init.py", line 9, in
from .sql import (
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/init.py", line 8, in
from .expression import (
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/expression.py", line 31, in
from .functions import func, modifier, FunctionElement, Function
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/functions.py", line 11, in
from . import sqltypes, schema
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/sqltypes.py", line 16, in
from .elements import quoted_name, type_coerce, _defer_name
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 21, in
from .base import Executable, PARSE_AUTOCOMMIT, Immutable, NO_ARG
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/sql/base.py", line 49, in
class _DialectArgView(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

@iredmail
Copy link
Owner

iredmail commented Mar 7, 2024

Dear all,

We have no plan to fix this shortly since iRedAPD works fine with SQLAlchemy-1.4.x which is available in ports tree (databases/py-sqlalchem14). The final solution will be replacing iRedAPD with a milter program written in Golang for better performance. FYI #11

@iredmail iredmail closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants