Comments (6)
SQLALCHEMY_DATABASE_URI ='postgresql://刺刀:aCymcibCp8RN @ localhost:5432 / bayonet'
我的数据库配置连接没问题呀!但是就是在插入数据库的时候报错!我数据库版本为11版本
请给出插入数据库的错误详情
from bayonet.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "app.py", line 22, in
CreateDatabase() # 创建数据
File "app.py", line 8, in CreateDatabase
DB.create_all()
File "/usr/local/lib/python3.6/site-packages/flask_sqlalchemy/init.py", line 1033, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/usr/local/lib/python3.6/site-packages/flask_sqlalchemy/init.py", line 1025, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/sql/schema.py", line 4316, in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 2048, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/lib64/python3.6/contextlib.py", line 81, in enter
return next(self.gen)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 2040, in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 2242, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 2280, in _wrap_pool_connect
e, dialect, self
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1547, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 152, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 2276, in _wrap_pool_connect
return fn()
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/pool/base.py", line 363, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/pool/base.py", line 760, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/pool/base.py", line 492, in checkout
rec = pool._do_get()
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/pool/impl.py", line 139, in _do_get
self._dec_overflow()
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 153, in reraise
raise value
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/pool/impl.py", line 136, in _do_get
return self._create_connection()
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/pool/base.py", line 308, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/pool/base.py", line 437, in init
self.__connect(first_connect_check=True)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/pool/base.py", line 639, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 482, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/lib64/python3.6/site-packages/psycopg2/init.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: database "bayonet" does not exist
(Background on this error at: http://sqlalche.me/e/e3q8)
from bayonet.
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: database "bayonet" does not exist
最后一行错误提示:sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: database "bayonet" does not exist,数据库不存在,需要自己创建一个空数据库。
from bayonet.
我创建了这个数据库的
from bayonet.
我也出现这个问题。我也创建了这个数据库。
from bayonet.
需要去数据库pg_hba.conf配置文件,允许md5登录
详情可以看这个:https://www.cnblogs.com/cyh2009/p/8564406.html
from bayonet.
Related Issues (20)
- 添加任务时主域名是否可以批量添加?
- 使用myql数据库时,编码错误
- docker中流程无法进行,只完成了子域名扫描 HOT 1
- 最近 xray 进行了更新,请问应该如何对 bayonet 系统更新最新版本的 xray 呢? HOT 1
- Spyse API Key (Update)
- 用url_time作为key进行数据库查询的问题
- 小建议:建议增加按厂商名称去搜索资产
- 小建议2:建议增加导出excel表功能,没这个有些遗憾。。
- 每次重新启动后都要爬虫扫描之前已经扫描的站点
- 爬虫最好做个范围限制
- English GUI
- shodapi具体配置哪个api接口呢 HOT 1
- xray运行提示不存在results目录
- 如何设置HTTPS?
- Windows可以搭建这个项目吗
- 过时的webhook实现,不适用于现在较新的xray版本了
- 只能子域名扫描,不能端口扫描
- 师傅
- 开始进行子域名入库时报错 HOT 1
- 博主这边有联系方式吗 有兴趣谈个合作推广吗~
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bayonet.