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

[Q] Error on migrating to mariadb, decimal.InvalidOperation #2835

Open
sfatula opened this issue Apr 26, 2024 · 1 comment
Open

[Q] Error on migrating to mariadb, decimal.InvalidOperation #2835

sfatula opened this issue Apr 26, 2024 · 1 comment
Labels

Comments

@sfatula
Copy link

sfatula commented Apr 26, 2024

I am wanting to use mariadb for my backend database, I am using it for many other applications. Using the docker image. \

Running the following command:

PYTHONPATH=/opt/graphite/webapp django-admin.py migrate --settings=graphite.settings --run-syncdb

Yields the following:

`Traceback (most recent call last):
File "/opt/graphite/bin/django-admin.py", line 5, in
management.execute_from_command_line()
File "/opt/graphite/lib/python3.9/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/opt/graphite/lib/python3.9/site-packages/django/core/management/init.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/graphite/lib/python3.9/site-packages/django/core/management/base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/graphite/lib/python3.9/site-packages/django/core/management/base.py", line 366, in execute
self.check()
File "/opt/graphite/lib/python3.9/site-packages/django/core/management/base.py", line 392, in check
all_issues = self._run_checks(
File "/opt/graphite/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 63, in _run_checks
issues = run_checks(tags=[Tags.database])
File "/opt/graphite/lib/python3.9/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/opt/graphite/lib/python3.9/site-packages/django/core/checks/database.py", line 10, in check_database_backends
issues.extend(conn.validation.check(**kwargs))
File "/opt/graphite/lib/python3.9/site-packages/django/db/backends/mysql/validation.py", line 9, in check
issues.extend(self._check_sql_mode(**kwargs))
File "/opt/graphite/lib/python3.9/site-packages/django/db/backends/mysql/validation.py", line 14, in _check_sql_mode
cursor.execute("SELECT @@sql_mode")
File "/opt/graphite/lib/python3.9/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/opt/graphite/lib/python3.9/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/opt/graphite/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql)
File "/opt/graphite/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 74, in execute
return self.cursor.execute(query, args)
File "/opt/graphite/lib/python3.9/site-packages/MySQLdb/cursors.py", line 179, in execute
res = self._query(mogrified_query)
File "/opt/graphite/lib/python3.9/site-packages/MySQLdb/cursors.py", line 332, in _query
self._post_get_result()
File "/opt/graphite/lib/python3.9/site-packages/MySQLdb/cursors.py", line 366, in _post_get_result
self._rows = self._fetch_row(0)
File "/opt/graphite/lib/python3.9/site-packages/MySQLdb/cursors.py", line 339, in _fetch_row
return self._result.fetch_row(size, self._fetch_type)
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]

I've been unable to determine the cause of this. Any ideas?
`

@deniszh
Copy link
Member

deniszh commented Apr 26, 2024

Never saw anything like this, sorry. Quick googling also didn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants