运行代码&返回值
`(py3) F:\Github\Fast-LianJia-Crawler>python app/main.py 110000
2019-04-26 18:28:27,388 root[config] INFO: 使用配置文件 "config.json".
2019-04-26 18:28:27,388 root[config] WARNING: 配置文件不存在, 使用默认配置文件 "config.default.json".
Traceback (most recent call last):
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2262, in _wrap_pool_connect
return fn()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 363, in connect
return _ConnectionFairy._checkout(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 760, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 492, in checkout
rec = pool._do_get()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\impl.py", line 139, in _do_get
self._dec_overflow()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\compat.py", line 129, in reraise
raise value
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\impl.py", line 136, in _do_get
return self._create_connection()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 308, in _create_connection
return _ConnectionRecord(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 437, in init
self.connect(first_connect_check=True)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 639, in connect
connection = pool._invoke_creator(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\strategies.py", line 114, in connect
return dialect.connect(*cargs, *cparams)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\default.py", line 453, in connect
return self.dbapi.connect(cargs, cparams)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\psycopg2__init__.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "app/main.py", line 11, in
from lian_jia import City, District, BizCircle, Community
File "F:\Github\Fast-LianJia-Crawler\app\lian_jia__init.py", line 5, in
Base.metadata.create_all(engine)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\sql\schema.py", line 4287, in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2032, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "F:\Tools\Anaconda3\envs\py3\lib\contextlib.py", line 112, in enter__
return next(self.gen)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2024, in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2266, in _wrap_pool_connect
e, dialect, self
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 1536, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\compat.py", line 128, in reraise
raise value.with_traceback(tb)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2262, in _wrap_pool_connect
return fn()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 363, in connect
return _ConnectionFairy._checkout(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 760, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 492, in checkout
rec = pool._do_get()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\impl.py", line 139, in _do_get
self._dec_overflow()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\compat.py", line 129, in reraise
raise value
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\impl.py", line 136, in _do_get
return self._create_connection()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 308, in _create_connection
return _ConnectionRecord(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 437, in init
self.connect(first_connect_check=True)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 639, in connect
connection = pool._invoke_creator(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\strategies.py", line 114, in connect
return dialect.connect(*cargs, *cparams)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\default.py", line 453, in connect
return self.dbapi.connect(cargs, cparams)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\psycopg2__init__.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
config
{ "db_info": { "db": "lian-jia", "host": "localhost", "user": "root", "password": "123456" } }
运行代码&返回值 `(py3) F:\Github\Fast-LianJia-Crawler>python app/main.py 110000 2019-04-26 18:28:27,388 root[config] INFO: 使用配置文件 "config.json". 2019-04-26 18:28:27,388 root[config] WARNING: 配置文件不存在, 使用默认配置文件 "config.default.json". Traceback (most recent call last): File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2262, in _wrap_pool_connect return fn() File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 363, in connect return _ConnectionFairy._checkout(self) File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 760, in _checkout fairy = _ConnectionRecord.checkout(pool) File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 492, in checkout rec = pool._do_get() File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\impl.py", line 139, in _do_get self._dec_overflow() File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit compat.reraise(exc_type, exc_value, exc_tb) File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\compat.py", line 129, in reraise raise value File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\impl.py", line 136, in _do_get return self._create_connection() File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 308, in _create_connection return _ConnectionRecord(self) File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 437, in init self.connect(first_connect_check=True) File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 639, in connect connection = pool._invoke_creator(self) File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\strategies.py", line 114, in connect return dialect.connect(*cargs, *cparams) File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\default.py", line 453, in connect return self.dbapi.connect(cargs, cparams) File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\psycopg2__init__.py", line 126, in connect conn = _connect(dsn, connection_factory=connection_factory, kwasync) psycopg2.OperationalError: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "app/main.py", line 11, in
from lian_jia import City, District, BizCircle, Community
File "F:\Github\Fast-LianJia-Crawler\app\lian_jia__init.py", line 5, in
Base.metadata.create_all(engine)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\sql\schema.py", line 4287, in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2032, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "F:\Tools\Anaconda3\envs\py3\lib\contextlib.py", line 112, in enter__
return next(self.gen)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2024, in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2266, in _wrap_pool_connect
e, dialect, self
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 1536, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\compat.py", line 128, in reraise
raise value.with_traceback(tb)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\base.py", line 2262, in _wrap_pool_connect
return fn()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 363, in connect
return _ConnectionFairy._checkout(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 760, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 492, in checkout
rec = pool._do_get()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\impl.py", line 139, in _do_get
self._dec_overflow()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\util\compat.py", line 129, in reraise
raise value
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\impl.py", line 136, in _do_get
return self._create_connection()
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 308, in _create_connection
return _ConnectionRecord(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 437, in init
self.connect(first_connect_check=True)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\pool\base.py", line 639, in connect
connection = pool._invoke_creator(self)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\strategies.py", line 114, in connect
return dialect.connect(*cargs, *cparams)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\sqlalchemy\engine\default.py", line 453, in connect
return self.dbapi.connect(cargs, cparams)
File "F:\Tools\Anaconda3\envs\py3\lib\site-packages\psycopg2__init__.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
(Background on this error at: http://sqlalche.me/e/e3q8)`