Traceback (most recent call last):


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner

response = get_response(request)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response

response = self.process_exception_by_middleware(e, request)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response

response = wrapped_callback(request, *callback_args, **callback_kwargs)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\contrib\admin\options.py", line 606, in wrapper

return self.admin_site.admin_view(view)(*args, **kwargs)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\utils\decorators.py", line 142, in _wrapped_view

response = view_func(request, *args, **kwargs)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\views\decorators\cache.py", line 44, in _wrapped_view_func

response = view_func(request, *args, **kwargs)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\contrib\admin\sites.py", line 223, in inner

return view(request, *args, **kwargs)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\contrib\admin\options.py", line 1645, in add_view

return self.changeform_view(request, None, form_url, extra_context)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\utils\decorators.py", line 45, in _wrapper

return bound_method(*args, **kwargs)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\utils\decorators.py", line 142, in _wrapped_view

response = view_func(request, *args, **kwargs)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\contrib\admin\options.py", line 1529, in changeform_view

return self._changeform_view(request, object_id, form_url, extra_context)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\contrib\admin\options.py", line 1565, in _changeform_view

form_validated = form.is_valid()


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\forms\forms.py", line 185, in is_valid

return self.is_bound and not self.errors


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\forms\forms.py", line 180, in errors

self.full_clean()


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\forms\forms.py", line 383, in full_clean

self._post_clean()


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\forms\models.py", line 403, in _post_clean

self.instance.full_clean(exclude=exclude, validate_unique=False)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\db\models\base.py", line 1184, in full_clean

self.clean_fields(exclude=exclude)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\db\models\base.py", line 1226, in clean_fields

setattr(self, f.attname, f.clean(raw_value, self))


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\db\models\fields\__init__.py", line 629, in clean

value = self.to_python(value)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\djongo\models\fields.py", line 242, in to_python

f'Value: {value} must be an instance of {self.base_type}')


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\db\models\base.py", line 522, in __str__

return '%s object (%s)' % (self.__class__.__name__, self.pk)


 "C:\Users\Akash\PycharmProjects\mongo\venv\lib\site-packages\django\db\models\base.py", line 572, in _get_pk_val

return getattr(self, meta.pk.attname)
AttributeError: 'NoneType' object has no attribute 'attname'

Traceback (most recent call last):


 "<console>", line 1, in <module>


 "/usr/local/lib/python3.6/site-packages/O365/connection.py", line 484, in refresh_token

self.token = token = (self.session
AttributeError: 'NoneType' object has no attribute 'refresh_token'
