mysql doesn't seem to work #37

Closed
opened 2026-10-05 06:03:08 +02:00 by adam · 3 comments
Owner

So, I've tried to run meshview with mysql with such connection string
connection_string = mysql+aiomysql://meshview:PASSWD@localhost:3306/meshview

It created two tables and crashed.

sty 17 19:19:40 venus systemd[1]: meshview-db.service: Scheduled restart job, restart counter is at 26.
sty 17 19:19:40 venus systemd[1]: Started meshview-db.service - Meshview Database Initializer.
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:251 [pid:160974] INFO - Migration status set to 'in progress'
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:255 [pid:160974] INFO - Checking for pending database migrations...
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:207 [pid:160974] INFO - Context impl MySQLImpl.
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:210 [pid:160974] INFO - Will assume non-transactional DDL.
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:259 [pid:160974] INFO - Database schema needs updating, running migrations...
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migrations.py:112 [pid:160974] INFO - Running database migrations...
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migrations.py:121 [pid:160974] INFO - Calling alembic upgrade command...
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:207 [pid:160974] INFO - Context impl MySQLImpl.
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:210 [pid:160974] INFO - Will assume non-transactional DDL.
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:618 [pid:160974] INFO - Running upgrade  -> c88468b7ab0b, Initial migration
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migrations.py:127 [pid:160974] ERROR - Error running migrations: (in table 'node', column 'id'): VARCHAR requires a length on dialect mysql
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:270 [pid:160974] INFO - Clearing migration status...
sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:272 [pid:160974] INFO - Migration status cleared - database ready
sty 17 19:19:40 venus python[160974]: Traceback (most recent call last):
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 6769, in visit_create_table
sty 17 19:19:40 venus python[160974]:     processed = self.process(
sty 17 19:19:40 venus python[160974]:                 ^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 932, in process
sty 17 19:19:40 venus python[160974]:     return obj._compiler_dispatch(self, **kwargs)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/visitors.py", line 138, in _compiler_dispatch
sty 17 19:19:40 venus python[160974]:     return meth(self, **kw)  # type: ignore  # noqa: E501
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 6800, in visit_create_column
sty 17 19:19:40 venus python[160974]:     text = self.get_column_specification(column, first_pk=first_pk)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/base.py", line 2021, in get_column_specification
sty 17 19:19:40 venus python[160974]:     self.dialect.type_compiler_instance.process(
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 977, in process
sty 17 19:19:40 venus python[160974]:     return type_._compiler_dispatch(self, **kw)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/visitors.py", line 138, in _compiler_dispatch
sty 17 19:19:40 venus python[160974]:     return meth(self, **kw)  # type: ignore  # noqa: E501
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 7391, in visit_string
sty 17 19:19:40 venus python[160974]:     return self.visit_VARCHAR(type_, **kw)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/base.py", line 2550, in visit_VARCHAR
sty 17 19:19:40 venus python[160974]:     raise exc.CompileError(
sty 17 19:19:40 venus python[160974]: sqlalchemy.exc.CompileError: VARCHAR requires a length on dialect mysql
sty 17 19:19:40 venus python[160974]: The above exception was the direct cause of the following exception:
sty 17 19:19:40 venus python[160974]: Traceback (most recent call last):
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/startdb.py", line 335, in <module>
sty 17 19:19:40 venus python[160974]:     asyncio.run(main())
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
sty 17 19:19:40 venus python[160974]:     return runner.run(main)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
sty 17 19:19:40 venus python[160974]:     return self._loop.run_until_complete(task)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
sty 17 19:19:40 venus python[160974]:     return future.result()
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/startdb.py", line 260, in main
sty 17 19:19:40 venus python[160974]:     migrations.run_migrations(database_url)
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/meshview/migrations.py", line 123, in run_migrations
sty 17 19:19:40 venus python[160974]:     command.upgrade(config, "head")
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/command.py", line 406, in upgrade
sty 17 19:19:40 venus python[160974]:     script.run_env()
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/script/base.py", line 586, in run_env
sty 17 19:19:40 venus python[160974]:     util.load_python_file(self.dir, "env.py")
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
sty 17 19:19:40 venus python[160974]:     module = load_module_py(module_id, path)
sty 17 19:19:40 venus python[160974]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
sty 17 19:19:40 venus python[160974]:     spec.loader.exec_module(module)  # type: ignore
sty 17 19:19:40 venus python[160974]:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "<frozen importlib._bootstrap_external>", line 995, in exec_module
sty 17 19:19:40 venus python[160974]:   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/alembic/env.py", line 102, in <module>
sty 17 19:19:40 venus python[160974]:     run_migrations_online()
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/alembic/env.py", line 93, in run_migrations_online
sty 17 19:19:40 venus python[160974]:     pool.submit(lambda: asyncio.run(run_async_migrations())).result()
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/concurrent/futures/_base.py", line 456, in result
sty 17 19:19:40 venus python[160974]:     return self.__get_result()
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
sty 17 19:19:40 venus python[160974]:     raise self._exception
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run
sty 17 19:19:40 venus python[160974]:     result = self.fn(*self.args, **self.kwargs)
sty 17 19:19:40 venus python[160974]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/alembic/env.py", line 93, in <lambda>
sty 17 19:19:40 venus python[160974]:     pool.submit(lambda: asyncio.run(run_async_migrations())).result()
sty 17 19:19:40 venus python[160974]:                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
sty 17 19:19:40 venus python[160974]:     return runner.run(main)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
sty 17 19:19:40 venus python[160974]:     return self._loop.run_until_complete(task)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
sty 17 19:19:40 venus python[160974]:     return future.result()
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/alembic/env.py", line 81, in run_async_migrations
sty 17 19:19:40 venus python[160974]:     await connection.run_sync(do_run_migrations)
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/engine.py", line 888, in run_sync
sty 17 19:19:40 venus python[160974]:     return await greenlet_spawn(
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 203, in greenlet_spawn
sty 17 19:19:40 venus python[160974]:     result = context.switch(value)
sty 17 19:19:40 venus python[160974]:              ^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/alembic/env.py", line 56, in do_run_migrations
sty 17 19:19:40 venus python[160974]:     context.run_migrations()
sty 17 19:19:40 venus python[160974]:   File "<string>", line 8, in run_migrations
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/runtime/environment.py", line 946, in run_migrations
sty 17 19:19:40 venus python[160974]:     self.get_context().run_migrations(**kw)
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/runtime/migration.py", line 623, in run_migrations
sty 17 19:19:40 venus python[160974]:     step.migration_fn(**kw)
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/alembic/versions/c88468b7ab0b_initial_migration.py", line 31, in upgrade
sty 17 19:19:40 venus python[160974]:     op.create_table(
sty 17 19:19:40 venus python[160974]:   File "<string>", line 8, in create_table
sty 17 19:19:40 venus python[160974]:   File "<string>", line 3, in create_table
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/operations/ops.py", line 1318, in create_table
sty 17 19:19:40 venus python[160974]:     return operations.invoke(op)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/operations/base.py", line 442, in invoke
sty 17 19:19:40 venus python[160974]:     return fn(self, operation)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/operations/toimpl.py", line 143, in create_table
sty 17 19:19:40 venus python[160974]:     operations.impl.create_table(table, **kw)
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/ddl/impl.py", line 406, in create_table
sty 17 19:19:40 venus python[160974]:     self._exec(schema.CreateTable(table, **kw))
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/ddl/impl.py", line 247, in _exec
sty 17 19:19:40 venus python[160974]:     return conn.execute(construct, params)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1419, in execute
sty 17 19:19:40 venus python[160974]:     return meth(
sty 17 19:19:40 venus python[160974]:            ^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 187, in _execute_on_connection
sty 17 19:19:40 venus python[160974]:     return connection._execute_ddl(
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1527, in _execute_ddl
sty 17 19:19:40 venus python[160974]:     compiled = ddl.compile(
sty 17 19:19:40 venus python[160974]:                ^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 311, in compile
sty 17 19:19:40 venus python[160974]:     return self._compiler(dialect, **kw)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 76, in _compiler
sty 17 19:19:40 venus python[160974]:     return dialect.ddl_compiler(dialect, self, **kw)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 886, in __init__
sty 17 19:19:40 venus python[160974]:     self.string = self.process(self.statement, **compile_kwargs)
sty 17 19:19:40 venus python[160974]:                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 932, in process
sty 17 19:19:40 venus python[160974]:     return obj._compiler_dispatch(self, **kwargs)
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/visitors.py", line 138, in _compiler_dispatch
sty 17 19:19:40 venus python[160974]:     return meth(self, **kw)  # type: ignore  # noqa: E501
sty 17 19:19:40 venus python[160974]:            ^^^^^^^^^^^^^^^^
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 6779, in visit_create_table
sty 17 19:19:40 venus python[160974]:     raise exc.CompileError(
sty 17 19:19:40 venus python[160974]: sqlalchemy.exc.CompileError: (in table 'node', column 'id'): VARCHAR requires a length on dialect mysql
sty 17 19:19:40 venus python[160974]: Exception ignored in: <function Connection.__del__ at 0x7f98c35a6840>
sty 17 19:19:40 venus python[160974]: Traceback (most recent call last):
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/aiomysql/connection.py", line 1131, in __del__
sty 17 19:19:40 venus python[160974]:   File "/home/format/meshview/env/lib/python3.12/site-packages/aiomysql/connection.py", line 339, in close
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/selector_events.py", line 1211, in close
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/selector_events.py", line 875, in close
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/base_events.py", line 795, in call_soon
sty 17 19:19:40 venus python[160974]:   File "/usr/lib/python3.12/asyncio/base_events.py", line 541, in _check_closed
sty 17 19:19:40 venus python[160974]: RuntimeError: Event loop is closed
sty 17 19:19:41 venus systemd[1]: meshview-db.service: Main process exited, code=exited, status=1/FAILURE
sty 17 19:19:41 venus systemd[1]: meshview-db.service: Failed with result 'exit-code'.

And the output of tables:

┌──(root💀venus)-[/home/format]
└─# mysql -u meshview -p                                                                                                                                                                         130 ⨯
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 45
Server version: 10.11.13-MariaDB-0ubuntu0.24.04.1 Ubuntu 24.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use meshview
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [meshview]> show tables;
+--------------------+
| Tables_in_meshview |
+--------------------+
| alembic_version    |
| migration_status   |
+--------------------+
2 rows in set (0,000 sec)

MariaDB [meshview]>
So, I've tried to run meshview with mysql with such connection string connection_string = mysql+aiomysql://meshview:PASSWD@localhost:3306/meshview It created two tables and crashed. ``` sty 17 19:19:40 venus systemd[1]: meshview-db.service: Scheduled restart job, restart counter is at 26. sty 17 19:19:40 venus systemd[1]: Started meshview-db.service - Meshview Database Initializer. sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:251 [pid:160974] INFO - Migration status set to 'in progress' sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:255 [pid:160974] INFO - Checking for pending database migrations... sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:207 [pid:160974] INFO - Context impl MySQLImpl. sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:210 [pid:160974] INFO - Will assume non-transactional DDL. sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:259 [pid:160974] INFO - Database schema needs updating, running migrations... sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migrations.py:112 [pid:160974] INFO - Running database migrations... sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migrations.py:121 [pid:160974] INFO - Calling alembic upgrade command... sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:207 [pid:160974] INFO - Context impl MySQLImpl. sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:210 [pid:160974] INFO - Will assume non-transactional DDL. sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migration.py:618 [pid:160974] INFO - Running upgrade -> c88468b7ab0b, Initial migration sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 migrations.py:127 [pid:160974] ERROR - Error running migrations: (in table 'node', column 'id'): VARCHAR requires a length on dialect mysql sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:270 [pid:160974] INFO - Clearing migration status... sty 17 19:19:40 venus python[160974]: 2026-01-17 19:19:40 startdb.py:272 [pid:160974] INFO - Migration status cleared - database ready sty 17 19:19:40 venus python[160974]: Traceback (most recent call last): sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 6769, in visit_create_table sty 17 19:19:40 venus python[160974]: processed = self.process( sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 932, in process sty 17 19:19:40 venus python[160974]: return obj._compiler_dispatch(self, **kwargs) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/visitors.py", line 138, in _compiler_dispatch sty 17 19:19:40 venus python[160974]: return meth(self, **kw) # type: ignore # noqa: E501 sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 6800, in visit_create_column sty 17 19:19:40 venus python[160974]: text = self.get_column_specification(column, first_pk=first_pk) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/base.py", line 2021, in get_column_specification sty 17 19:19:40 venus python[160974]: self.dialect.type_compiler_instance.process( sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 977, in process sty 17 19:19:40 venus python[160974]: return type_._compiler_dispatch(self, **kw) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/visitors.py", line 138, in _compiler_dispatch sty 17 19:19:40 venus python[160974]: return meth(self, **kw) # type: ignore # noqa: E501 sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 7391, in visit_string sty 17 19:19:40 venus python[160974]: return self.visit_VARCHAR(type_, **kw) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/base.py", line 2550, in visit_VARCHAR sty 17 19:19:40 venus python[160974]: raise exc.CompileError( sty 17 19:19:40 venus python[160974]: sqlalchemy.exc.CompileError: VARCHAR requires a length on dialect mysql sty 17 19:19:40 venus python[160974]: The above exception was the direct cause of the following exception: sty 17 19:19:40 venus python[160974]: Traceback (most recent call last): sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/startdb.py", line 335, in <module> sty 17 19:19:40 venus python[160974]: asyncio.run(main()) sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run sty 17 19:19:40 venus python[160974]: return runner.run(main) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run sty 17 19:19:40 venus python[160974]: return self._loop.run_until_complete(task) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete sty 17 19:19:40 venus python[160974]: return future.result() sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/startdb.py", line 260, in main sty 17 19:19:40 venus python[160974]: migrations.run_migrations(database_url) sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/meshview/migrations.py", line 123, in run_migrations sty 17 19:19:40 venus python[160974]: command.upgrade(config, "head") sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/command.py", line 406, in upgrade sty 17 19:19:40 venus python[160974]: script.run_env() sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/script/base.py", line 586, in run_env sty 17 19:19:40 venus python[160974]: util.load_python_file(self.dir, "env.py") sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file sty 17 19:19:40 venus python[160974]: module = load_module_py(module_id, path) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py sty 17 19:19:40 venus python[160974]: spec.loader.exec_module(module) # type: ignore sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "<frozen importlib._bootstrap_external>", line 995, in exec_module sty 17 19:19:40 venus python[160974]: File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/alembic/env.py", line 102, in <module> sty 17 19:19:40 venus python[160974]: run_migrations_online() sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/alembic/env.py", line 93, in run_migrations_online sty 17 19:19:40 venus python[160974]: pool.submit(lambda: asyncio.run(run_async_migrations())).result() sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/concurrent/futures/_base.py", line 456, in result sty 17 19:19:40 venus python[160974]: return self.__get_result() sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result sty 17 19:19:40 venus python[160974]: raise self._exception sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run sty 17 19:19:40 venus python[160974]: result = self.fn(*self.args, **self.kwargs) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/alembic/env.py", line 93, in <lambda> sty 17 19:19:40 venus python[160974]: pool.submit(lambda: asyncio.run(run_async_migrations())).result() sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run sty 17 19:19:40 venus python[160974]: return runner.run(main) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run sty 17 19:19:40 venus python[160974]: return self._loop.run_until_complete(task) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete sty 17 19:19:40 venus python[160974]: return future.result() sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/alembic/env.py", line 81, in run_async_migrations sty 17 19:19:40 venus python[160974]: await connection.run_sync(do_run_migrations) sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/engine.py", line 888, in run_sync sty 17 19:19:40 venus python[160974]: return await greenlet_spawn( sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 203, in greenlet_spawn sty 17 19:19:40 venus python[160974]: result = context.switch(value) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/alembic/env.py", line 56, in do_run_migrations sty 17 19:19:40 venus python[160974]: context.run_migrations() sty 17 19:19:40 venus python[160974]: File "<string>", line 8, in run_migrations sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/runtime/environment.py", line 946, in run_migrations sty 17 19:19:40 venus python[160974]: self.get_context().run_migrations(**kw) sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/runtime/migration.py", line 623, in run_migrations sty 17 19:19:40 venus python[160974]: step.migration_fn(**kw) sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/alembic/versions/c88468b7ab0b_initial_migration.py", line 31, in upgrade sty 17 19:19:40 venus python[160974]: op.create_table( sty 17 19:19:40 venus python[160974]: File "<string>", line 8, in create_table sty 17 19:19:40 venus python[160974]: File "<string>", line 3, in create_table sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/operations/ops.py", line 1318, in create_table sty 17 19:19:40 venus python[160974]: return operations.invoke(op) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/operations/base.py", line 442, in invoke sty 17 19:19:40 venus python[160974]: return fn(self, operation) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/operations/toimpl.py", line 143, in create_table sty 17 19:19:40 venus python[160974]: operations.impl.create_table(table, **kw) sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/ddl/impl.py", line 406, in create_table sty 17 19:19:40 venus python[160974]: self._exec(schema.CreateTable(table, **kw)) sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/alembic/ddl/impl.py", line 247, in _exec sty 17 19:19:40 venus python[160974]: return conn.execute(construct, params) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1419, in execute sty 17 19:19:40 venus python[160974]: return meth( sty 17 19:19:40 venus python[160974]: ^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 187, in _execute_on_connection sty 17 19:19:40 venus python[160974]: return connection._execute_ddl( sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 1527, in _execute_ddl sty 17 19:19:40 venus python[160974]: compiled = ddl.compile( sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/elements.py", line 311, in compile sty 17 19:19:40 venus python[160974]: return self._compiler(dialect, **kw) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/ddl.py", line 76, in _compiler sty 17 19:19:40 venus python[160974]: return dialect.ddl_compiler(dialect, self, **kw) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 886, in __init__ sty 17 19:19:40 venus python[160974]: self.string = self.process(self.statement, **compile_kwargs) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 932, in process sty 17 19:19:40 venus python[160974]: return obj._compiler_dispatch(self, **kwargs) sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/visitors.py", line 138, in _compiler_dispatch sty 17 19:19:40 venus python[160974]: return meth(self, **kw) # type: ignore # noqa: E501 sty 17 19:19:40 venus python[160974]: ^^^^^^^^^^^^^^^^ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/sqlalchemy/sql/compiler.py", line 6779, in visit_create_table sty 17 19:19:40 venus python[160974]: raise exc.CompileError( sty 17 19:19:40 venus python[160974]: sqlalchemy.exc.CompileError: (in table 'node', column 'id'): VARCHAR requires a length on dialect mysql sty 17 19:19:40 venus python[160974]: Exception ignored in: <function Connection.__del__ at 0x7f98c35a6840> sty 17 19:19:40 venus python[160974]: Traceback (most recent call last): sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/aiomysql/connection.py", line 1131, in __del__ sty 17 19:19:40 venus python[160974]: File "/home/format/meshview/env/lib/python3.12/site-packages/aiomysql/connection.py", line 339, in close sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/selector_events.py", line 1211, in close sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/selector_events.py", line 875, in close sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/base_events.py", line 795, in call_soon sty 17 19:19:40 venus python[160974]: File "/usr/lib/python3.12/asyncio/base_events.py", line 541, in _check_closed sty 17 19:19:40 venus python[160974]: RuntimeError: Event loop is closed sty 17 19:19:41 venus systemd[1]: meshview-db.service: Main process exited, code=exited, status=1/FAILURE sty 17 19:19:41 venus systemd[1]: meshview-db.service: Failed with result 'exit-code'. ``` And the output of tables: ``` ┌──(root💀venus)-[/home/format] └─# mysql -u meshview -p 130 ⨯ Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 45 Server version: 10.11.13-MariaDB-0ubuntu0.24.04.1 Ubuntu 24.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> use meshview Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [meshview]> show tables; +--------------------+ | Tables_in_meshview | +--------------------+ | alembic_version | | migration_status | +--------------------+ 2 rows in set (0,000 sec) MariaDB [meshview]> ``` <!-- github-sync-id:3825620082 -->
adam closed this issue 2026-10-05 06:03:08 +02:00
Author
Owner

Thank you for the info. I have not tested with mysql yet.

you may need to create the tables before using them?

Thank you for the info. I have not tested with mysql yet. you may need to create the tables before using them? <!-- github-comment-id:3774057977 -->
Author
Owner

Hi, do you know where can I find table structure plan?

Hi, do you know where can I find table structure plan? <!-- github-comment-id:3778289054 -->
Author
Owner

As of now we are only supporting sqlite and postage :)

As of now we are only supporting sqlite and postage :) <!-- github-comment-id:4185619498 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/meshview#37