Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python manage.py中的数据库错误:“0”;TypeError:无效的postgreSQL类型:bigint“;_Python_Django_Postgresql_Django South - Fatal编程技术网

Python manage.py中的数据库错误:“0”;TypeError:无效的postgreSQL类型:bigint“;

Python manage.py中的数据库错误:“0”;TypeError:无效的postgreSQL类型:bigint“;,python,django,postgresql,django-south,Python,Django,Postgresql,Django South,我的一台服务器最近在尝试使用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: bigi

我的一台服务器最近在尝试使用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
设置:django、postgis、south、ubuntu

令人困惑的是,这台服务器最近没有发生任何变化,另外3台安装完全相同的服务器工作正常

我打开了postgres语句日志记录,但没有发现任何明显的错误:

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 TO 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 TO '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()
从settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.postgis',
        'NAME': 'redacted',
        'USER': 'redacted',
        'PASSWORD':'...',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}
博士后版本:

psql (9.1.9)
Type "help" for help.

redacted=# select version();
                                                  version
------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.1.9 on x86_64-unknown-linux-gnu, compiled by 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

事实证明,该错误是由另一个模块djorm ext pgarray引起的,该模块已在服务器上更新,但在其他服务器上没有更新。我通过在python模块中搜索错误消息找到了原因

这是模块中的一个快速修复(1行代码),最初通过添加模块的本地副本,然后通过向模块作者发送pull请求进行部署


这个故事的寓意是:当心使用pip升级模块。

事实证明,该错误是由另一个模块djorm ext pgarray引起的,该模块已在服务器上更新,但未在其他服务器上更新。我通过在python模块中搜索错误消息找到了原因

这是模块中的一个快速修复(1行代码),最初通过添加模块的本地副本,然后通过向模块作者发送pull请求进行部署

这个故事的寓意是:小心用pip升级模块