Traceback (most recent call last): File "/Users/ricardomartinez/BIA CLAUDE PROYECTOS/Proyectos Claude IA/Talento Humano Api Dashboard/cargar_historico_nomina_pyg.py", line 308, in cargar_nomina raw = post_json(f"{API_BASE}/nomina/reporte", payload, API_KEY) File "/Users/ricardomartinez/BIA CLAUDE PROYECTOS/Proyectos Claude IA/Talento Humano Api Dashboard/cargar_historico_nomina_pyg.py", line 142, in post_json with urllib.request.urlopen(req, timeout=timeout, context=SSL_CTX) as resp: ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/urllib/request.py", line 187, in urlopen return opener.open(url, data, timeout) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/urllib/request.py", line 487, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/urllib/request.py", line 504, in _open result = self._call_chain(self.handle_open, protocol, protocol + '_open', req) File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/urllib/request.py", line 464, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/urllib/request.py", line 1369, in https_open return self.do_open(http.client.HTTPSConnection, req, ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ context=self._context) ^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/urllib/request.py", line 1325, in do_open r = h.getresponse() File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/http/client.py", line 1450, in getresponse response.begin() ~~~~~~~~~~~~~~^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/http/client.py", line 336, in begin version, status, reason = self._read_status() ~~~~~~~~~~~~~~~~~^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/http/client.py", line 297, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/socket.py", line 725, in readinto return self._sock.recv_into(b) ~~~~~~~~~~~~~~~~~~~~^^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/ssl.py", line 1304, in recv_into return self.read(nbytes, buffer) ~~~~~~~~~^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/ssl.py", line 1138, in read return self._sslobj.read(len, buffer) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ TimeoutError: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/ricardomartinez/BIA CLAUDE PROYECTOS/Proyectos Claude IA/Talento Humano Api Dashboard/cargar_historico_nomina_pyg.py", line 477, in main cargar_nomina(conn, hoteles, args.desde, args.hasta, args.pausa) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ricardomartinez/BIA CLAUDE PROYECTOS/Proyectos Claude IA/Talento Humano Api Dashboard/cargar_historico_nomina_pyg.py", line 314, in cargar_nomina upsert_control(conn, "nomina", ano, mes, nit=nit, estado="error", error=str(exc)) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ricardomartinez/BIA CLAUDE PROYECTOS/Proyectos Claude IA/Talento Humano Api Dashboard/cargar_historico_nomina_pyg.py", line 172, in upsert_control cur.execute(""" ~~~~~~~~~~~^^^^ INSERT INTO historico_nomina_pyg_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... terminado_en = EXCLUDED.terminado_en ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ """, (fuente, ano, mes, periodo, nit, company_id, bu_codigo, estado, filas, error, estado)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ psycopg2.OperationalError: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/ricardomartinez/BIA CLAUDE PROYECTOS/Proyectos Claude IA/Talento Humano Api Dashboard/cargar_historico_nomina_pyg.py", line 483, in main() ~~~~^^ File "/Users/ricardomartinez/BIA CLAUDE PROYECTOS/Proyectos Claude IA/Talento Humano Api Dashboard/cargar_historico_nomina_pyg.py", line 451, in main with connect() as conn: ~~~~~~~^^ psycopg2.InterfaceError: connection already closed