在注册新用户的时候报错:

(sqlite3.OperationalError) no such table: users [SQL: 'SELECT users.id AS users_id, users.email AS users_email, users.username AS users_username, users.role_id AS users_role_id, users.password_hash AS users_password_hash, users.confirmed AS users_confirmed

检查数据库的时候发现没有建立应该存在的两张表

这时候我们需要程序的shell

创建数据库

在执行完成db.create_all()之后

在查看数据库

数据库中出现了我们需要的roles和users的table。

这时候我们的用户就能正常注册了。

于是我把这个错误记录下来,方便有同样错误的人查找问题。如果你碰到同样的问题欢迎和我联系,我们一起学习进步。

http://blog.csdn.net/ai52011/article/details/77853051

转!sqlite3.OperationalError) no such table- users [SQL- 'SELECT users.id AS users_id, users.email AS u的更多相关文章

  1. (sqlite3.OperationalError) no such table: users [SQL: 'SELECT users.id AS users_id, users.email AS users_email, users.username AS users_username, users.role_id AS users_role_id, users.password_hash A

    在注册新用户的时候报错: (sqlite3.OperationalError) no such table: users [SQL: 'SELECT users.id AS users_id, use ...

  2. 解决 "OperationalError: (sqlite3.OperationalError) no such table: ..."问题

    参考:flask/sqlalchemy - OperationalError: (sqlite3.OperationalError) no such table 在用Flask写一个简单的py文件,做 ...

  3. flask/sqlalchemy - OperationalError: (sqlite3.OperationalError) no such table

    狗书第五章 记得要先创建表 执行 db.create_all()语句来创建表 https://segmentfault.com/q/1010000005794140

  4. sqlite3.OperationalError: no such table: account_user

    你可能是在项目中安装了多个app, 首先删除相关app的migration文件中的子文件 执行建表的时候使用: python manage.py makemigrations appname pyth ...

  5. sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Cannot add a NOT NULL column with default value NULL [SQL: u'ALTER TABLE address_scopes ADD COLUMN ip_version INTEGER NOT NULL']

    root@hett-virtual-machine:~# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neu ...

  6. discuz搬家后报错SQL:SELECT value FROM [Table]vars WHERE name=’noteexists1′的解决办法

    基本上每个站长都会经历网站搬家,网站搬家中有时候就会遇到这次提到的这个错误数据库报错::SQL:SELECT value FROM [Table]vars WHERE name=\\\'noteexi ...

  7. Dynamic Pivot table wizard SQL Server

    原文 http://www.gyurcit.hu/pivot.html Dynamic Pivot table wizard This stored procedure generate dynami ...

  8. How can I list all foreign keys referencing a given table in SQL Server?

    How can I list all foreign keys referencing a given table in SQL Server?  how to check if columns in ...

  9. django.db.utils.OperationalError: no such table: auth_user

    关于使用django 首次创建超级管理员时,出现     django.db.utils.OperationalError: no such table: auth_user   错误 1.首先使用命 ...

随机推荐

  1. Spring框架学习(10)Spring中如何使用事务?

    内容源自:Spring中如何使用事务? 一.为什么要使用事务? 如果我们一个业务逻辑只执行一次sql,是不需要使用事务的.但如果要执行多条sql语句才能完成一个业务逻辑的话,这个时候就要使用事务了. ...

  2. [Unity3D]场景间切换与数据传递(以及物体删除技巧)

    http://blog.163.com/kingmax_res/blog/static/77282442201031712216508/ 先介绍一些基本函数(具体用法自己查文档):---------- ...

  3. Mysql 如何查询两个时间段之间的数据?

    Mysql 如何查询两个时间段之间的数据?

  4. DOM BOM document window 区别

    DOM 是为了操作文档出现的 API,document 是其的一个对象: BOM 是为了操作浏览器出现的 API,window 是其的一个对象.   使用下图讲解:   归DOM管的: E区:即doc ...

  5. Unity3D系列教程--使用免费工具在Unity3D中开发2D游戏 第一节

    声明:   本博客文章翻译类别的均为个人翻译,版权全部.出处: http://blog.csdn.net/ml3947,个人博客:http://www.wjfxgame.com. 译者说明:这是一个系 ...

  6. 剑指OFFER之二叉搜索树与双向链表(九度OJ1503)

    题目描述: 输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的双向链表.要求不能创建任何新的结点,只能调整树中结点指针的指向. 输入: 输入可能包含多个测试样例.对于每个测试案例,输入的第一行为一个数 ...

  7. 一个架构合理的UITableView应该是如何的?

    原文: http://www.chentoo.com/?p=200 iOS 开发中,UITableView 应该是最经常使用到的了.完毕一个UITableView应该实现他的DataSource和De ...

  8. java数据库操作:JDBC的操作

    1,JDBC注意操作类及接口: 数据库操作过程: 1)打开数据库服务 2)连接数据库:一般都要输入用户名,密码, 3)操作数据库:创建表:查询表,更新,记录. 4)关闭数据库. 1,DriverMan ...

  9. LR11.50 通过Mobile Application 录制手机操作

    LR11.50 通过Mobile Application 录制手机操作 步骤就是 1:新建LR脚本.协议选择Mobile Application - HTTP/HTML 2:在record里选择第三个 ...

  10. iOS 音频视频图像合成那点事

    代码地址如下:http://www.demodashi.com/demo/13420.html 人而无信不知其可 前言 很久很久没有写点什么了,只因为最近事情太多了,这几天终于闲下来了,趁此机会,记录 ...