python manage.py syncdb problem

69 views
Skip to first unread message

Zico

unread,
Sep 9, 2009, 1:37:22 AM9/9/09
to django...@googlegroups.com
Hi, I have been trying to install fixmystreet in one of my Fedora 11 machine. In one step, i need to enter the command to sync my database. Command is: python manage.py syncdb

But, here, i get the error:

psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block

Here is the full error:

[root@fedora fixmystreet]# python manage.py syncdb
local_settings.py not set; using default settings
local_settings.py not set; using default settings
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/lib/python2.6/site- packages/django/core/
management/__init__.py", line 362, in execute_manager
    utility.execute()
  File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 303, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 221, in execute
    self.validate()
  File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.6/site-packages/django/core/management/validation.py", line 28, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/lib/python2.6/site-packages/django/db/models/loading.py", line 131, in get_app_errors
    self._populate()
  File "/usr/lib/python2.6/site-packages/django/db/models/loading.py", line 58, in _populate
    self.load_app(app_name, True)
  File "/usr/lib/python2.6/site-packages/django/db/models/loading.py", line 74, in load_app
    models = import_module('.models', app_name)
  File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/opt/fixmystreet/mainapp/models.py", line 3, in <module>
    from django.contrib.gis.db import models
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/models/__init__.py", line 5, in <module>
    from django.contrib.gis.db.models.aggregates import *
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/models/aggregates.py", line 2, in <module>
    from django.contrib.gis.db.backend import SpatialBackend
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/backend/__init__.py", line 12, in <module>
    from django.contrib.gis.db.backend.postgis import create_test_spatial_db, get_geo_where_clause, SpatialBackend
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/backend/postgis/__init__.py", line 4, in <module>
    from django.contrib.gis.db.backend.postgis.adaptor import PostGISAdaptor
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/backend/postgis/adaptor.py", line 5, in <module>
    from django.contrib.gis.db.backend.postgis.query import GEOM_FROM_WKB
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/backend/postgis/query.py", line 27, in <module>
    version_tuple = postgis_version_tuple()
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/backend/postgis/management.py", line 45, in postgis_version_tuple
    version = postgis_lib_version()
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/backend/postgis/management.py", line 25, in postgis_lib_version
    return _get_postgis_func('postgis_lib_version')
  File "/usr/lib/python2.6/site-packages/django/contrib/gis/db/backend/postgis/management.py", line 13, in _get_postgis_func
    cursor.execute('SELECT %s()' % func)
psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block



--
Best,
Zico

ankit rai

unread,
Sep 9, 2009, 1:40:51 AM9/9/09
to django...@googlegroups.com
hello,

this error shows that there is some postgres db connection exception.please check ur connection or debug ur code.

Kenneth Gonsalves

unread,
Sep 9, 2009, 2:19:10 AM9/9/09
to django...@googlegroups.com
On Wednesday 09 Sep 2009 11:07:22 am Zico wrote:
> File
> "/usr/lib/python2.6/site-packages/django/contrib/gis/db/backend/postgis/man

>agement.py", line 13, in _get_postgis_func
> cursor.execute('SELECT %s()' % func)
> *psycopg2.InternalError: current transaction is aborted, commands ignored
> until end of transaction block*

is postgis installed?
--
regards
kg
http://lawgon.livejournal.com

Zico

unread,
Sep 9, 2009, 3:19:06 AM9/9/09
to django...@googlegroups.com, anki...@gmail.com
On Wed, Sep 9, 2009 at 11:40 AM, ankit rai <anki...@gmail.com> wrote:
hello,

this error shows that there is some postgres db connection exception.please check ur connection

As far as i know, everything is ok so far. But, if i check with python manage.py dbshell, it can connect!

--
Best,
Zico
Reply all
Reply to author
Forward
0 new messages