Hi David, Il giorno dom 29 nov 2020 alle ore 01:20 Shaozhong SHI < shishaozh...@gmail.com> ha scritto:
> Hi, > > I keep getting the following error when I use engine = > create_engine(logging in details to postgres) > df.to_sql('table_name', and etc.) > > > OperationalError: (psycopg2.OperationalError) SSL connection has been > closed unexpectedly > > (Background on this error at: http://sqlalche.me/e/13/e3q8) > OperationalError: (psycopg2.OperationalError) SSL connection has been > closed unexpectedly > > Can anyone shed any light on this? > This question is not really related to PostGIS, anyway... Looks like you are trying to persist a Python Pandas dataframe into a PostgreSQL table using SQLAlchemy as driver. You are omitting to specify the connection string you used to create the engine that needs to be passed into the to_sql() Pandas' method, but the issue is probably there: the OperationlError exception is generally raised when SQLAlchemy is not able to open a proper connection to the DB. Giuseppe.
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users