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

(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。

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

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

(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的更多相关文章

  1. 转!sqlite3.OperationalError) no such table- users [SQL- 'SELECT users.id AS users_id, users.email AS u

    在注册新用户的时候报错: (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. sql SELECT时的with(nolock)选项说明

    I used to see my senior developers use WITH (NOLOCK) when querying in SQL Server and wonder why they ...

  8. select into from 和 insert into select 的区别和用法及 SQL SELECT INTO 中Undeclared variable错误解决办法

    今天试了一下数据表中的数据备份到另一个空的数据表,然后使用了SQL SELECT INTO语句,然后提示Undeclared variable......错误,现在在这里做下总结并给出解决办法. 应用 ...

  9. MySQL select into 和 SQL select into

    现在有张表为student,我想将这个表里面的数据复制到一个为dust的新表中去,虽然可以用以下语句进行复制,总觉得不爽,希望各位帮助下我,谢谢.  answer 01: create table d ...

随机推荐

  1. github设置

    ssh-key: https://help.github.com/articles/generating-ssh-keys http://segmentfault.com/q/101000000013 ...

  2. 【源码解析】Sharding-Jdbc中的算法

    Sharding-jdbc中的很多地方涉及到算法,比如主从配置这块.分库分表这块.本文主要从源码角度介绍下,目前主要包含哪些算法,以及这些算法的内容. 一.读写分离(主从配置) 这块的代码主要在cor ...

  3. jenkins~管道Pipeline的使用,再见jenkinsUI

    Pipeline在Jenkins里的作用 最近一直在使用jenkins进行自动化部署的工作,开始觉得很爽,省去了很多重复的工作,它帮助我自动拉服务器的代码,自动还原包包,自动编译项目,自动发布项目,自 ...

  4. POJ1082食物链

    加权并查集入门习题. 传送门http://poj.org/problem?id=1182 下面来记录一下做法: 并查集的作用是询问两个对象时候在同一集合以及将两个非空不相交集合合并. 本题涉及两点之间 ...

  5. Lua脚本在C++下的舞步

    我是一名C++程序员,所以在很多时候,不想过多的使用Lua的特性,因为个人感觉,Lua的语法要比C++的更加灵活.而我更希望,在函数调用的某些习惯上,遵循一些C++的规则.好了,废话少说,我们先来看一 ...

  6. 2733:判断闰年-poj

    2733:判断闰年 总时间限制:  1000ms 内存限制:  65536kB 描述 判断某年是否是闰年. 输入 输入只有一行,包含一个整数a(0 < a < 3000) 输出 一行,如果 ...

  7. [翻译]Python List Comprehensions: Explained Visually || Python列表解析式

    原文1地址: http://treyhunner.com/2015/12/python-list-comprehensions-now-in-color/ 原文2地址: http://blog.tea ...

  8. leecode -- 3sum Closet

    Given an array S of n integers, find three integers in S such that the sum is closest to a given num ...

  9. gcc & gdb & make 定义与区别

    GCC 通常所说的GCC是GUN Compiler Collection的简称,除了编译程序之外,它还含其他相关工具,所以它能把易于人类使用的高级语言编写的源代码构建成计算机能够直接执行的二进制代码. ...

  10. Libevent 事件管理和添加事件

    /**   我们先来看一下事件的创建*/struct event * event_new(struct event_base *base, evutil_socket_t fd, short even ...