Jam*_*483 8 django geodjango django-2.2
我设置了一个当前为空的Geodjango应用程序-我已连接到Postgis数据库,在该数据库中我有一个名为aadf的表,试图从中创建模型。我正在使用inspectdb来做到这一点。
我收到以下错误消息:
from django.contrib.gis.db import models
# Unable to inspect table 'aadf'
# The error was: sequence index must be integer, not 'slice'
# Unable to inspect table 'auth_group'
# The error was: sequence index must be integer, not 'slice'
# Unable to inspect table 'auth_group_permissions'
# The error was: sequence index must be integer, not 'slice'
** This error message repeats for multiple other tables that Django has created **
Run Code Online (Sandbox Code Playgroud)
与数据库的连接显然很不错,因为它可以获取相关的表名。也就是说,它似乎还试图检查Django在数据库中创建的其他表,例如“ auth_group”和“ auth_group_permissions”。
dho*_*bbs 18
我收到此错误,发现它是由使用psycopg2版本2.8(或2.8.1)引起的-降级为2.7.7使其消失了。这是在Windows 10和Django 2.2上。
编辑:我现在看到在Django 2.2的管道中有一个修复程序,以支持psycopg2 2.8。
编辑(5/1/2019): Django 2.2.1现已发布,有一个修复程序添加了对psycopg2 2.8的支持。
| 归档时间: |
|
| 查看次数: |
1606 次 |
| 最近记录: |