[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] ssl connection has been closed unexpectedly
From:       Giuseppe Broccolo <g.broccolo.7 () gmail ! com>
Date:       2020-11-30 16:25:11
Message-ID: CAFtuf8BT4J64FRVvtCWqn=5reJQt5VS8ynyh=CQB+sWoysw7-Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi David,

Il giorno dom 29 nov 2020 alle ore 01:20 Shaozhong SHI <
shishaozhong@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.

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr">Hi David,<br></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">Il giorno dom 29 nov 2020 alle ore 01:20 Shaozhong SHI \
&lt;<a href="mailto:shishaozhong@gmail.com">shishaozhong@gmail.com</a>&gt; ha \
scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
class="gmail_quote"><div dir="ltr"><div>Hi,  <br></div><div><br></div><div>I keep \
getting the following error when I use engine = create_engine(logging in details to \
postgres)</div><div>df.to_sql(&#39;table_name&#39;, and \
etc.)</div><div><br></div><div><br></div>OperationalError: \
(psycopg2.OperationalError) SSL connection has been closed \
unexpectedly<br><br>(Background on this error at: <a \
href="http://sqlalche.me/e/13/e3q8" \
target="_blank">http://sqlalche.me/e/13/e3q8</a>)<br>OperationalError: \
(psycopg2.OperationalError) SSL connection has been closed \
unexpectedly<br><div><br></div><div>Can anyone shed any light on \
this?</div></div></div></div></blockquote><div><br></div><div>This question is not \
really related to PostGIS, anyway...</div><div><br></div><div>Looks like you are \
trying to persist a Python Pandas dataframe into a PostgreSQL table \
using</div><div>SQLAlchemy as driver. You are omitting to specify the connection \
string you used to create the engine</div><div>that needs to be passed into the \
to_sql() Pandas&#39; method, but the issue is probably there:</div><div>the \
OperationlError exception is generally raised when SQLAlchemy is not able to open a \
proper connection</div><div>to the \
DB.</div><div><br></div><div>Giuseppe.<br></div></div></div>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic