• 从sqlite 迁移到mysql报错,处理 D:seafile-server_5.0.3_win32seafile-server-5.0.3seahubsql 重新执行这个SQL


    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_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangocorehandlersase.py", line 113, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangoutilsdecorators.py", line 91, in wrappedview
    response = view_func(request, *args, **kwargs)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangoviewsdecoratorscache.py", line 89, in wrappedview_func
    response = view_func(request, *args, **kwargs)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahubseahubauthviews.py", line 148, in login
    return log_user_in(request, form.get_user(), redirect_to)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahubseahubauthviews.py", line 45, in log_user_in
    auth_login(request, user)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahubseahubauth__init__.py", line 92, in login
    user_logged_in.send(sender=user.class, request=request, user=user)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangodispatchdispatcher.py", line 170, in send
    response = receiver(signal=self, sender=sender, **named)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahubseahubasemodels.py", line 189, in update_last_login
    user_last_login.save()
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangodbmodelsase.py", line 546, in save
    force_update=force_update, update_fields=update_fields)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangodbmodelsase.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_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangodbmodelsmanager.py", line 215, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangodbmodelsquery.py", line 1675, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangodbmodelssqlcompiler.py", line 943, in execute_sql
    cursor.execute(sql, params)
    File "G:seafile-server_5.0.3_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangodbackendsmysqlase.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_win32seafile-server-5.0.3seahub	hirdpartdjango-1.5.12-py2.7.eggdjangodbackendsmysqlase.py", line 120, in execute
    return self.cursor.execute(query, args)
    File "C:Python27libsite-packagesMySQLdbcursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
    File "C:Python27libsite-packagesMySQLdbconnections.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_win32seafile-server-5.0.3seahubsql 重新执行这个SQL

  • 相关阅读:
    mysql字符集
    zabbix自动发现zabbix_agent后添加到所属组和链接到某些模块(九)
    zabbix_agent添加到系统服务启动(八)
    苦苦的追寻,奈何~~(一年三份工作的总结)
    systemd service 设置limit,不生效问题
    logrotate
    cron定时任务
    crontab定时任务第一个周期未完成下一个周期执行就来了
    来年仍旧迷茫...
    rsync的daemon模式
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349779.html
Copyright © 2020-2023  润新知