Skip to content

Instantly share code, notes, and snippets.

@conradwt
Created March 19, 2019 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conradwt/f60a9ec49b6275e0b609fdca161bcdef to your computer and use it in GitHub Desktop.
Save conradwt/f60a9ec49b6275e0b609fdca161bcdef to your computer and use it in GitHub Desktop.
ile "/home/conradwt/env/lib/python3.5/site-packages/flask/app.py", line 1994, in __call__
return self.wsgi_app(environ, start_response)
File "/home/conradwt/env/lib/python3.5/site-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/home/conradwt/env/lib/python3.5/site-packages/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/conradwt/env/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/conradwt/env/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/home/conradwt/env/lib/python3.5/site-packages/flask/app.py", line 1607, in full_dispatch_request
self.try_trigger_before_first_request_functions()
File "/home/conradwt/env/lib/python3.5/site-packages/flask/app.py", line 1654, in try_trigger_before_first_request_functions
func()
File "/home/conradwt/gmemegen/app/main.py", line 52, in setup_db
db.create_all()
File "/home/conradwt/env/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py", line 963, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/home/conradwt/env/lib/python3.5/site-packages/flask_sqlalchemy/__init__.py", line 955, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/sql/schema.py", line 4287, in create_all
ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2032, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2024, in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 354, in connect
return _ConnectionFairy._checkout(self)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 751, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 483, in checkout
rec = pool._do_get()
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 138, in _do_get
self._dec_overflow()
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
raise value
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/pool/impl.py", line 135, in _do_get
return self._create_connection()
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 299, in _create_connection
return _ConnectionRecord(self)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 428, in __init__
self.__connect(first_connect_check=True)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/pool/base.py", line 630, in __connect
connection = pool._invoke_creator(self)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/home/conradwt/env/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/home/conradwt/env/lib/python3.5/site-packages/pg8000/__init__.py", line 111, in connect
application_name)
File "/home/conradwt/env/lib/python3.5/site-packages/pg8000/core.py", line 1409, in __init__
code, data_len = ci_unpack(self._read(5))
File "/usr/lib/python3.5/socket.py", line 576, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment