MySQL Forums
Forum List  »  Connector/Python

'Not naive datetime (tzinfo is already set)')
Posted by: Matvey Teplov
Date: August 09, 2022 05:46AM

Hi Guys,

Anyone seen this message in SQL operations?
(venv) root@84ff53e702e9:/www_root# python migrate
Traceback (most recent call last):
File "", line 24, in <module>
File "", line 20, in main
File "/venv/lib/python3.8/site-packages/django/core/management/", line 419, in execute_from_command_line
File "/venv/lib/python3.8/site-packages/django/core/management/", line 413, in execute
File "/venv/lib/python3.8/site-packages/django/core/management/", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/venv/lib/python3.8/site-packages/django/core/management/", line 398, in execute
output = self.handle(*args, **options)
File "/venv/lib/python3.8/site-packages/django/core/management/", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/venv/lib/python3.8/site-packages/django/core/management/commands/", line 92, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/venv/lib/python3.8/site-packages/django/db/migrations/", line 18, in __init__
self.loader = MigrationLoader(self.connection)
File "/venv/lib/python3.8/site-packages/django/db/migrations/", line 53, in __init__
File "/venv/lib/python3.8/site-packages/django/db/migrations/", line 220, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/venv/lib/python3.8/site-packages/django/db/migrations/", line 78, in applied_migrations
return {(, migration for migration in self.migration_qs}
File "/venv/lib/python3.8/site-packages/django/db/models/", line 280, in __iter__
File "/venv/lib/python3.8/site-packages/django/db/models/", line 1324, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/venv/lib/python3.8/site-packages/django/db/models/", line 68, in __iter__
for row in compiler.results_iter(results):
File "/venv/lib/python3.8/site-packages/django/db/models/sql/", line 1122, in apply_converters
value = converter(value, expression, connection)
File "/venv/lib/python3.8/site-packages/django/db/backends/mysql/", line 313, in convert_datetimefield_value
value = timezone.make_aware(value, self.connection.timezone)
File "/venv/lib/python3.8/site-packages/django/utils/", line 242, in make_aware
return timezone.localize(value, is_dst=is_dst)
File "/venv/lib/python3.8/site-packages/pytz/", line 245, in localize
raise ValueError('Not naive datetime (tzinfo is already set)')


Options: ReplyQuote

Written By
'Not naive datetime (tzinfo is already set)')
August 09, 2022 05:46AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.