2017-04-11 12:24:31,905 [ERROR] django.request:210 handle_uncaught_exception Internal Server Error: /accounts/login/ Traceback (most recent call last): File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\core\handlers\base.py", line 113, in get_response response = callback(request, *callback_args, **callback_kwargs) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\utils\decorators.py", line 91, in wrappedview response = view_func(request, *args, **kwargs) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\views\decorators\cache.py", line 89, in wrappedview_func response = view_func(request, *args, **kwargs) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\seahub\auth\views.py", line 148, in login return log_user_in(request, form.get_user(), redirect_to) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\seahub\auth\views.py", line 45, in log_user_in auth_login(request, user) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\seahub\auth__init__.py", line 92, in login user_logged_in.send(sender=user.class, request=request, user=user) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\dispatch\dispatcher.py", line 170, in send response = receiver(signal=self, sender=sender, **named) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\seahub\base\models.py", line 189, in update_last_login user_last_login.save() File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\db\models\base.py", line 546, in save force_update=force_update, update_fields=update_fields) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\db\models\base.py", line 650, in save_base result = manager.insert([self], fields=fields, returnid=update_pk, using=using, raw=raw) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\db\models\manager.py", line 215, in _insert return insert_query(self.model, objs, fields, **kwargs) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\db\models\query.py", line 1675, in insert_query return query.get_compiler(using=using).execute_sql(return_id) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\db\models\sql\compiler.py", line 943, in execute_sql cursor.execute(sql, params) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\db\backends\mysql\base.py", line 128, in execute six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2]) File "G:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\thirdpart\django-1.5.12-py2.7.egg\django\db\backends\mysql\base.py", line 120, in execute return self.cursor.execute(query, args) File "C:\Python27\lib\site-packages\MySQLdb\cursors.py", line 205, in execute self.errorhandler(self, exc, value) File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue DatabaseError: (1364, "Field 'id' doesn't have a default value") 从sqlite 迁移到mysql报错,处理 D:\seafile-server_5.0.3_win32\seafile-server-5.0.3\seahub\sql 重新执行这个SQL