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

Error running qinfo #339

Open
dcollinsn opened this issue Feb 4, 2019 · 1 comment
Open

Error running qinfo #339

dcollinsn opened this issue Feb 4, 2019 · 1 comment

Comments

@dcollinsn
Copy link

Seems like the difference "stopped - started" is being treated as a DateTime, and something is looking for a time zone on it...

Python 3.6, Django 2.1.2, django-q 1.0.1, django-redis 4.10.0. Pytz 2018.7, not that I think it matters.

System check identified some issues:

WARNINGS:
?: (django_mysql.W003) The character set is not utf8mb4 for database connection 'default'
	HINT: The default 'utf8' character set does not include support for all Unicode characters. It's strongly recommended you move to use 'utf8mb4'. See: https://django-mysql.readthedocs.io/en/latest/checks.html#django-mysql-w003-utf8mb4
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 316, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 353, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.6/dist-packages/django_q/management/commands/qinfo.py", line 41, in handle
    info()
  File "/usr/local/lib/python3.6/dist-packages/django_q/monitor.py", line 127, in info
    exec_time = last_tasks.aggregate(time_taken=Sum(F('stopped') - F('started')))
  File "/usr/local/lib/python3.6/dist-packages/django/db/models/query.py", line 370, in aggregate
    return query.get_aggregation(self.db, kwargs)
  File "/usr/local/lib/python3.6/dist-packages/django/db/models/sql/query.py", line 488, in get_aggregation
    result = next(compiler.apply_converters((result,), converters))
  File "/usr/local/lib/python3.6/dist-packages/django/db/models/sql/compiler.py", line 1009, in apply_converters
    value = converter(value, expression, connection)
  File "/usr/local/lib/python3.6/dist-packages/django/db/backends/mysql/operations.py", line 252, in convert_datetimefield_value
    value = timezone.make_aware(value, self.connection.timezone)
  File "/usr/local/lib/python3.6/dist-packages/django/utils/timezone.py", line 264, in make_aware
    return timezone.localize(value, is_dst=is_dst)
  File "/usr/local/lib/python3.6/dist-packages/pytz/__init__.py", line 223, in localize
    if dt.tzinfo is not None:
AttributeError: 'decimal.Decimal' object has no attribute 'tzinfo'
@madEng84
Copy link

madEng84 commented Oct 29, 2019

Duplicate (but with more important issue info) of #245 issue

It seems to be a problem only of mysql vendor.

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

2 participants