python - Database error from manage.py: "TypeError: invalid postgreSQL type: bigint" -
one of servers started having error when trying use of south related commands manage.py
$ python ./manage.py migrate typeerror: invalid postgresql type: bigint $ python ./manage.py syncdb typeerror: invalid postgresql type: bigint $ python ./manage.py shell typeerror: invalid postgresql type: bigint
the setup: django, postgis, south, ubuntu.
the confusing part nothing has changed on server recently, , 3 other servers should exact same setup working correctly.
i turned on postgres statement logging, i'm not seeing obvious errors there:
2013-09-24 16:33:14 utc log: statement: show default_transaction_isolation 2013-09-24 16:33:14 utc log: statement: set default_transaction_isolation default 2013-09-24 16:33:14 utc log: statement: set time zone 'america/chicago' 2013-09-24 16:33:14 utc log: statement: set default_transaction_isolation 'read committed' 2013-09-24 16:33:14 utc log: statement: begin 2013-09-24 16:33:14 utc log: statement: select postgis_lib_version()
from settings.py:
databases = { 'default': { 'engine': 'django.contrib.gis.db.backends.postgis', 'name': 'redacted', 'user': 'redacted', 'password':'...', 'host': 'localhost', 'port': '5432', } }
postgres versions:
psql (9.1.9) type "help" help. redacted=# select version(); version ------------------------------------------------------------------------------------------------------------ postgresql 9.1.9 on x86_64-unknown-linux-gnu, compiled gcc (ubuntu/linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit (1 row) redacted=# select postgis_lib_version(); postgis_lib_version --------------------- 2.0.1 (1 row)
django-1.5.4
python 2.7.3
it turns out bug caused module djorm-ext-pgarray, had been updated on server error, not on other servers. able find cause of greping through python modules error message.
it quick fix in module(1 line of code), deployed adding local copy of module, , sending pull request module author.
the moral of story: beware of upgrading modules pip.
Comments
Post a Comment