[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Python Psycopg2 - Interface Error : Connection already closed

knobbyknees

3/27/2010 9:15:00 PM

I'm not sure if this is the right group, but I'm hoping it is...

Basically, I'm trying to use pgloader, which depends on python and
psycopg2. After banging my head against a wall, I found this:

Found this:
http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg...

Although, the suggestion didn't work for me at all...

Running this command:
/usr/bin/pgloader -c /var/mybin/pgconfs/fr.conf

Yields this in the pgloader.log (with the process just hanging)

more /tmp/pgloader.log
27-03-2010 12:22:53 pgloader INFO Logger initialized
27-03-2010 12:22:53 pgloader INFO Reformat path is ['/usr/
share/python-support/pgloader/reformat']
27-03-2010 12:22:53 pgloader INFO Will consider following
sections:
27-03-2010 12:22:53 pgloader INFO fixed
27-03-2010 12:22:54 fixed INFO fixed processing
27-03-2010 12:22:54 pgloader INFO All threads are started,
wait for them to terminate
27-03-2010 12:22:57 fixed ERROR connection already closed
27-03-2010 12:22:57 fixed INFO closing current database
connection

[pgsql]
host = localhost
port = 5432
base = frdb
user = username
pass = password


[fixed]
table = fr
format = fixed
filename = /var/www/fr.txt
....


This is what I see for the traceback:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 525, in
__bootstrap_inner
self.run()
File "/usr/lib/pymodules/python2.6/pgloader/pgloader.py", line 847,
in run
self.terminate()
File "/usr/lib/pymodules/python2.6/pgloader/pgloader.py", line 874,
in terminate
self.db.close()
File "/usr/lib/pymodules/python2.6/pgloader/db.py", line 103, in
close
self.dbconn.close()


I'm at a total loss here.... Can anyone please help me out?
1 Answer

Philip Semanchuk

3/28/2010 9:44:00 PM

0


On Mar 27, 2010, at 5:14 PM, knobbyknees wrote:

> I'm not sure if this is the right group, but I'm hoping it is...
>
> Basically, I'm trying to use pgloader, which depends on python and
> psycopg2. After banging my head against a wall, I found this:
>
> Found this:
> http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg...
>
> Although, the suggestion didn't work for me at all...
>
> Running this command:
> /usr/bin/pgloader -c /var/mybin/pgconfs/fr.conf
>
> Yields this in the pgloader.log (with the process just hanging)
>
> more /tmp/pgloader.log
> 27-03-2010 12:22:53 pgloader INFO Logger initialized
> 27-03-2010 12:22:53 pgloader INFO Reformat path is ['/usr/
> share/python-support/pgloader/reformat']
> 27-03-2010 12:22:53 pgloader INFO Will consider following
> sections:
> 27-03-2010 12:22:53 pgloader INFO fixed
> 27-03-2010 12:22:54 fixed INFO fixed processing
> 27-03-2010 12:22:54 pgloader INFO All threads are started,
> wait for them to terminate
> 27-03-2010 12:22:57 fixed ERROR connection already closed
> 27-03-2010 12:22:57 fixed INFO closing current database
> connection
>
> [pgsql]
> host = localhost
> port = 5432
> base = frdb
> user = username
> pass = password
>
>
> [fixed]
> table = fr
> format = fixed
> filename = /var/www/fr.txt
> ...
>
>
> This is what I see for the traceback:
> Traceback (most recent call last):
> File "/usr/lib/python2.6/threading.py", line 525, in
> __bootstrap_inner
> self.run()
> File "/usr/lib/pymodules/python2.6/pgloader/pgloader.py", line 847,
> in run
> self.terminate()
> File "/usr/lib/pymodules/python2.6/pgloader/pgloader.py", line 874,
> in terminate
> self.db.close()
> File "/usr/lib/pymodules/python2.6/pgloader/db.py", line 103, in
> close
> self.dbconn.close()
>
>
> I'm at a total loss here.... Can anyone please help me out?

Hi knobbyknees,
I can't help you with this problem, but the folks on the psycopg2
mailing list are probably a much better crowd to ask:
http://lists.initd.org/mailman/listin...


Good luck
Philip