Skip to content

Can't Install with MariaDB, Ubuntu Server 22.04. Errors on "./manage.py migrate". #161

Description

@Danrancan

I am trying to install etebase on Ubuntu Server 22.04 for the Raspberry Pi 4, using Mariadb in accordance with this tutorial.. Everything works up until I run the ./manage.py migrate command, which returns the following errors:

Traceback (most recent call last):
  File "/home/boo/etebase/./manage.py", line 21, in <module>
    main()
  File "/home/boo/etebase/./manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 75, in handle
    self.check(databases=[database])
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 419, in check
    all_issues = checks.run_checks(
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/checks/registry.py", line 76, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/core/checks/database.py", line 13, in check_database_backends
    issues.extend(conn.validation.check(**kwargs))
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/mysql/validation.py", line 9, in check
    issues.extend(self._check_sql_mode(**kwargs))
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/mysql/validation.py", line 13, in _check_sql_mode
    if not (self.connection.sql_mode & {'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES'}):
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 405, in sql_mode
    sql_mode = self.mysql_server_data['sql_mode']
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 366, in mysql_server_data
    with self.temporary_connection() as cursor:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 603, in temporary_connection
    with self.cursor() as cursor:
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 259, in cursor
    return self._cursor()
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    self.ensure_connection()
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 199, in connect
    conn_params = self.get_connection_params()
  File "/home/boo/etebase/.venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 217, in get_connection_params
    options = settings_dict['OPTIONS'].copy()
AttributeError: 'SectionProxy' object has no attribute 'copy'

What exactly is going on here and how can I fix this in order to complete the installation?

Activity

  1. daftaupe commented on Jan 11, 2023

    @daftaupe
    Collaborator

    @Danrancan will have to try to reproduce first. I'll let you know how it goes.

  2. Danrancan commented on Jan 11, 2023

    @Danrancan
    Author

    @Danrancan will have to try to reproduce first. I'll let you know how it goes.

    Okay thanks. I'm wondering if its a ARM64 issue since I'm running it on the Raspberry pi.

  3. victor-rds commented on Jan 13, 2023

    @victor-rds
    Contributor

    @Danrancan AFAIK Etesync is not compatible with MariaDB/MySQL, until #69 is fixed.

  4. Top-Ranger commented on Jan 14, 2023

    @Top-Ranger

    This does sond familiar to me...
    I do think I fixed this by using etebase_server/settings.py instead of the etebase-server.ini.

    Can you try to remove the etebase-server.ini file and change the values in etebase_server/settings.py? My database config looks like the following:

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': 'etesync',
            'USER': 'etesync',
            'PASSWORD': 'PASSWORD',
            'HOST': '127.0.0.1',
            'PORT': '3306',
            'OPTIONS': {'charset': 'utf8mb4'},
        }
    }
    

    Please note that the workaround in #69 (comment) has to be applied too.

  5. allixx commented on Feb 3, 2025

    @allixx

    JFYI: no longer a problem for latest (at the moment) 6ac5412 and mariadb 10.11.8 on Ubuntu 24.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions