Python Psycopg2 - Interface Error : Connection already closed

knobbyknees jenjenmu at gmail.com
Sat Mar 27 22:14:31 CET 2010


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/msg13209.html

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?



More information about the Python-list mailing list