objectiv-analytics
objectiv-analytics copied to clipboard
Bug Report: Latest main throws errors for generating Docusaurus docs
Describe the bug Latest main throws errors for generating Docusaurus docs.
Steps To Reproduce Steps to reproduce the behavior:
- Go to bach/docs/ on latest
mainand follow the readme instructions on generating Bach docs. - Run
make clean docusaurus. - See error in console.
Expected behavior The build runs without errors.
Screenshots or Logs
WARNING:
>>>-------------------------------------------------------------------------
Exception in /home/ivar/objectiv-analytics/bach/docs/source/bach/examples.rst at block ending on line 148
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
OperationalError Traceback (most recent call last)
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py:3280, in Engine._wrap_pool_connect(self, fn, connection)
3279 try:
-> 3280 return fn()
3281 except dialect.dbapi.Error as e:
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:310, in Pool.connect(self)
303 """Return a DBAPI connection from the pool.
304
305 The connection is instrumented such that when its
(...)
308
309 """
--> 310 return _ConnectionFairy._checkout(self)
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:868, in _ConnectionFairy._checkout(cls, pool, threadconns, fairy)
867 if not fairy:
--> 868 fairy = _ConnectionRecord.checkout(pool)
870 fairy._pool = pool
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:476, in _ConnectionRecord.checkout(cls, pool)
474 @classmethod
475 def checkout(cls, pool):
--> 476 rec = pool._do_get()
477 try:
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/impl.py:146, in QueuePool._do_get(self)
145 with util.safe_reraise():
--> 146 self._dec_overflow()
147 else:
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py:70, in safe_reraise.__exit__(self, type_, value, traceback)
69 if not self.warn_only:
---> 70 compat.raise_(
71 exc_value,
72 with_traceback=exc_tb,
73 )
74 else:
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py:208, in raise_(***failed resolving arguments***)
207 try:
--> 208 raise exception
209 finally:
210 # credit to
211 # https://cosmicpercolator.com/2016/01/13/exception-leaks-in-python-2-and-3/
212 # as the __traceback__ object creates a cycle
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/impl.py:143, in QueuePool._do_get(self)
142 try:
--> 143 return self._create_connection()
144 except:
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:256, in Pool._create_connection(self)
254 """Called by subclasses to create a new ConnectionRecord."""
--> 256 return _ConnectionRecord(self)
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:371, in _ConnectionRecord.__init__(self, pool, connect)
370 if connect:
--> 371 self.__connect()
372 self.finalize_callback = deque()
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:666, in _ConnectionRecord.__connect(self)
665 with util.safe_reraise():
--> 666 pool.logger.debug("Error on connect(): %s", e)
667 else:
668 # in SQLAlchemy 1.4 the first_connect event is not used by
669 # the engine, so this will usually not be set
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py:70, in safe_reraise.__exit__(self, type_, value, traceback)
69 if not self.warn_only:
---> 70 compat.raise_(
71 exc_value,
72 with_traceback=exc_tb,
73 )
74 else:
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py:208, in raise_(***failed resolving arguments***)
207 try:
--> 208 raise exception
209 finally:
210 # credit to
211 # https://cosmicpercolator.com/2016/01/13/exception-leaks-in-python-2-and-3/
212 # as the __traceback__ object creates a cycle
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py:661, in _ConnectionRecord.__connect(self)
660 self.starttime = time.time()
--> 661 self.dbapi_connection = connection = pool._invoke_creator(self)
662 pool.logger.debug("Created new connection %r", connection)
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/engine/create.py:590, in create_engine.<locals>.connect(connection_record)
589 return connection
--> 590 return dialect.connect(*cargs, **cparams)
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py:597, in DefaultDialect.connect(self, *cargs, **cparams)
595 def connect(self, *cargs, **cparams):
596 # inherits the docstring from interfaces.Dialect.connect
--> 597 return self.dbapi.connect(*cargs, **cparams)
File ~/objectiv-analytics/bach/docs/venv/lib/python3.8/site-packages/psycopg2/__init__.py:122, in connect(dsn, connection_factory, cursor_factory, **kwargs)
121 dsn = _ext.make_dsn(dsn, **kwargs)
--> 122 conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
123 if cursor_factory is not None:
OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
The above exception was the direct cause of the following exception:
[CUT HERE]
Environment (please complete the following information where relevant):
- Latest main
- WSL for Linux on Windows
@KathiaBarahona @thijs-obj @vard-obj @hendrik-obj Any ideas?
@ivarpruijn There's an iPython script in examples.rst, line 133, that means the code is actually run, and it needs a PG instance. Simple solution is to have a running postgres instance, before building.
Let's close this now that all the code runs