Granted, I found this while trying to deploy mightylemon, but I figured it belonged here.
I get an error when trying to syncdb on mightylemon using postgresql. If I comment out "elsewhere", it syncs fine. I've just now started trying out postgresql so I have no real background in troubleshooting it, but I don't have this problem if I switch to a sqlite database.
django error:
psycopg2.ProgrammingError: current transaction is aborted, commands ignored until end of transaction block
postgresql error:
2009-04-19 06:26:18 UTC ERROR: relation "elsewhere_socialnetwork" does not exist
2009-04-19 06:26:18 UTC STATEMENT: SELECT "elsewhere_socialnetwork"."id", "elsewhere_socialnetwork"."name", "elsewhere_socialnetwork"."url", "elsewhere_socialnetwork"."identifier", "elsewhere_socialnetwork"."icon" FROM "elsewhere_socialnetwork"
2009-04-19 06:26:18 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2009-04-19 06:26:18 UTC STATEMENT: SELECT "elsewhere_instantmessenger"."id", "elsewhere_instantmessenger"."name", "elsewhere_instantmessenger"."url", "elsewhere_instantmessenger"."identifier", "elsewhere_instantmessenger"."icon" FROM "elsewhere_instantmessenger"
2009-04-19 06:26:18 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2009-04-19 06:26:18 UTC STATEMENT:
SELECT c.relname
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind IN ('r', 'v', '')
AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
AND pg_catalog.pg_table_is_visible(c.oid)
2009-04-19 06:26:18 UTC LOG: unexpected EOF on client connection
I've never used postgresql, and suck at sql in general so I'm not sure what is going on.. maybe leah has a better idea...
Leah,
If it helps at all, here is a link to django code wiki's take on what might be the problem:
http://code.djangoproject.com/wiki/BetterErrorMessages#django.db
A quick fix for this is to add to elsewhere.models the folowing:
from django.db import connection
and then in function definition for SocialNetworkData:
seen_model = connection.introspection.installed_models(['elsewhere_socialnetwork'])
if seen_model:
instead of try - except block which is used there now.
Then do the same for InstantMessengerData, just changing a model name:
seen_model = connection.introspection.installed_models(['elsewhere_instantmessenger'])
...
@restless Thanks for that! Worked like a charm.
@restless thanks! worked for me.