Skip to content

error on python sqlalchemy #4116

Closed

Description

@davidwxy

ArcadeDB version

  • Observed on Docker images: arcadedata/arcadedb:26.4.1-SNAPSHOT

Environment

  • OS: macOS 26.4.1
  • cpu: Apple M4
  • ArcadeDB: v26.4.1-SNAPSHOT
  • python: 3.11
  • python-orm : sqlalchemy-2.0.49
  • docker command: docker run --rm -p 2480:2480 -p 2424:2424 -p 6379:6379 -p 5432:5432 -p 8182:8182 --env JAVA_OPTS=" -Darcadedb.server.rootPassword=xxxxxx -Darcadedb.server.plugins=Redis:com.arcadedb.redis.RedisProtocolPlugin,Postgres:com.arcadedb.postgres.PostgresProtocolPlugin" arcadedata/arcadedb:latest

Describe the bug
use ArcadeDB with python ormframework sqlalchemy make TypeError: expected string or bytes-like object, got 'NoneType' , I don't know how to solve this problem, any help will be thankful

python code:

from sqlalchemy import create_engine
from sqlalchemy import text

engine = create_engine("postgresql+psycopg://root:xxxxxxx@localhost:5432/my_base")

with engine.connect() as conn:
    result = conn.execute(text("select * from V11"))
    print(result.all())

error message:

Traceback (most recent call last):
  File "/Users/david/python_test/my_ai_test/my_langchain/pg_test.py", line 49, in <module>
    with engine.connect() as conn:
         ^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3293, in connect
    return self._connection_cls(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 143, in __init__
    self._dbapi_connection = engine.raw_connection()
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3317, in raw_connection
    return self.pool.connect()
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 448, in connect
    return _ConnectionFairy._checkout(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 1272, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 712, in checkout
    rec = pool._do_get()
          ^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get
    with util.safe_reraise():
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 121, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 175, in _do_get
    return self._create_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 389, in _create_connection
    return _ConnectionRecord(self)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 674, in __init__
    self.__connect()
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 914, in __connect
    )._exec_w_sync_on_first_run(self.dbapi_connection, self)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/event/attr.py", line 501, in _exec_w_sync_on_first_run
    self(*args, **kw)
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/event/attr.py", line 515, in __call__
    fn(*args, **kw)
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 1897, in go
    return once_fn(*arg, **kw)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 773, in first_connect
    dialect.initialize(c)
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/psycopg.py", line 467, in initialize
    super().initialize(connection)
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py", line 3340, in initialize
    super().initialize(connection)
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 528, in initialize
    self.server_version_info = self._get_server_version_info(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/david/python_test/my_ai_test/.venv/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py", line 3611, in _get_server_version_info
    m = re.match(
        ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/__init__.py", line 166, in match
    return _compile(pattern, flags).match(string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

sqlalchemy doc:

https://docs.sqlalchemy.org/en/20/tutorial/dbapi_transactions.html

Activity

  1. self-assigned this
    on May 6, 2026
  2. added this to the 26.5.1 milestone on May 6, 2026
  3. added a commit that references this issue on May 6, 2026
  4. added a commit that references this issue on May 10, 2026
  5. added a commit that references this issue on May 12, 2026
  6. added a commit that references this issue on Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions