As a follow-up with further information. This error occurs when on the Admin login screen I enter the user name and password and then click "SUBMIT".
The Exception Location is: "/home/medrec2/.virtualenvs/medrecproj/lib/python3.5/site-packages/mysql/connector/conversion.py in _DATETIME_to_python, line 506".
Is there another db connector I can use to connect to the Mariadb database?
On Tuesday, May 1, 2018 at 7:45:47 AM UTC+8, Gerald Brown wrote:
-- The Exception Location is: "/home/medrec2/.virtualenvs/medrecproj/lib/python3.5/site-packages/mysql/connector/conversion.py in _DATETIME_to_python, line 506".
Is there another db connector I can use to connect to the Mariadb database?
On Tuesday, May 1, 2018 at 7:45:47 AM UTC+8, Gerald Brown wrote:
I had replied to Daniel Roseman instead of to the users group as I am new to this group.
Thanks to Daniel for his response
-------- Forwarded Message --------
Subject: Re: AttributeError at /admin/login/ Date: Mon, 30 Apr 2018 21:46:35 +0800 From: Gerald Brown To: Daniel Roseman
Here is the full traceback. It is quite long.--No. You need to show the full traceback.--DR.
AttributeError at /admin/login/
'datetime.datetime' object has no attribute 'split'
Request Method: POST Request URL: http://192.168.0.122/admin/ login/?next=/admin/ Django Version: 2.0.4 Exception Type: AttributeError Exception Value: 'datetime.datetime' object has no attribute 'split'Exception Location: /home/medrec2/.local/lib/ python3.6/site-packages/mysql/ connector/conversion.py in _DATETIME_to_python, line 506 Python Executable: /home/medrec2/.virtualenvs/ medrecproj/bin/python3.6 Python Version: 3.6.5 Python Path: ['/home/medrec2/medrecproj', '/home/medrec2/.virtualenvs/medrecproj/bin', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib- dynload', '/home/medrec2/.local/lib/ python3.6/site-packages', '/usr/local/lib/python3.6/ site-packages'] Server time: Sun, 29 Apr 2018 18:31:23 +0800 Traceback Switch to copy-and-paste view
/home/medrec2/.local/lib/
inpython3.6/site-packages/ django/core/handlers/ exception.py inner
response = get_response(request).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/core/handlers/base.py _get_response
response = self.process_exception_by_...middleware(e, request) /home/medrec2/.local/lib/
inpython3.6/site-packages/ django/core/handlers/base.py _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/views/decorators/cache. py _wrapped_view_func
response = view_func(request, *args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/contrib/admin/sites.py login
return LoginView.as_view(**defaults)(...request) /home/medrec2/.local/lib/
inpython3.6/site-packages/ django/views/generic/base.py view
return self.dispatch(request, *args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/utils/decorators.py _wrapper
return bound_func(*args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/views/decorators/debug. py sensitive_post_parameters_
wrapper
return view(request, *args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/utils/decorators.py bound_func
return func.__get__(self, type(self))(*args2, **kwargs2).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/utils/decorators.py _wrapper
return bound_func(*args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/utils/decorators.py _wrapped_view
response = view_func(request, *args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/utils/decorators.py bound_func
return func.__get__(self, type(self))(*args2, **kwargs2).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/utils/decorators.py _wrapper
return bound_func(*args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/views/decorators/cache. py _wrapped_view_func
response = view_func(request, *args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/utils/decorators.py bound_func
return func.__get__(self, type(self))(*args2, **kwargs2).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/contrib/auth/views.py dispatch
return super().dispatch(request, *args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/views/generic/base.py dispatch
return handler(request, *args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/views/generic/edit.py post
if form.is_valid():.../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/forms/forms.py is_valid
return self.is_bound and not self.errors.../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/forms/forms.py errors
self.full_clean().../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/forms/forms.py full_clean
self._clean_form().../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/forms/forms.py _clean_form
cleaned_data = self.clean().../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/contrib/auth/forms.py clean
self.user_cache = authenticate(self.request, username=username, password=password).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/contrib/auth/__init__. py authenticate
user = _authenticate_with_backend(...backend, backend_path, request, credentials) /home/medrec2/.local/lib/
inpython3.6/site-packages/ django/contrib/auth/__init__. py _authenticate_with_backend
return backend.authenticate(*args, **credentials).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/contrib/auth/backends. py authenticate
user = UserModel._default_manager....get_by_natural_key(username) /home/medrec2/.local/lib/
inpython3.6/site-packages/ django/contrib/auth/base_user. py get_by_natural_key
return self.get(**{self.model....USERNAME_FIELD: username}) /home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/models/manager.py manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/models/query.py get
num = len(clone).../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/models/query.py __len__
self._fetch_all().../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/models/query.py _fetch_all
self._result_cache = list(self._iterable_class(...self)) /home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/models/query.py __iter__
for row in compiler.results_iter(results)...: /home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/models/sql/compiler. py apply_converters
for row in map(list, rows):.../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/models/sql/compiler. py cursor_iter
for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):.../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/models/sql/compiler. py <lambda>
for rows in iter((lambda: cursor.fetchmany(itersize)), sentinel):.../home/medrec2/.local/lib/
inpython3.6/site-packages/ django/db/utils.py inner
return func(*args, **kwargs).../home/medrec2/.local/lib/
inpython3.6/site-packages/mysql/ connector/cursor_cext.py fetchmany
rows.extend(self._cnx.get_...rows(size)) /home/medrec2/.local/lib/
inpython3.6/site-packages/mysql/ connector/connection_cext.py get_rows
row[i]).../home/medrec2/.local/lib/
inpython3.6/site-packages/mysql/ connector/conversion.py to_python
return self._cache_field_types[vtype[...1]](value, vtype) /home/medrec2/.local/lib/
inpython3.6/site-packages/mysql/ connector/django/base.py _DATETIME_to_python
dt = MySQLConverter._DATETIME_to_...python(self, value) /home/medrec2/.local/lib/
inpython3.6/site-packages/mysql/ connector/conversion.py _DATETIME_to_python
(date_, time_) = value.split(b' ')...
As it shows most of the errors occur in the site-packages/mysql/connector.
I am using the mysql-connector-python to connect to the Mariadb database. I have this same application running on another computer and I do NOT get this error. Thanks for your reply.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/583559d9-1d45-429e-adc0-51cd6d408104%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment