如何修复GeoDjango教程?

问题描述 投票:0回答:1

我正在按照GeoDjango Tutorial的说明使用Sqlite来执行here

当我调用load.py脚本时,它停止显示错误:

Failed to save the feature (id: 206) into the model with the keyword arguments:
{'fips': 'UK', 'iso2': 'GB', 'iso3': 'GBR', 'un': 826, 'name': 'United Kingdom'
...
sqlite3.IntegrityError: NOT NULL constraint failed: world_worldborder.mpoly
...
django.db.utils.IntegrityError: NOT NULL constraint failed: world_worldborder.mpoly

有人知道这个问题的原因吗?还有一种Django管理几何的方法,可以很好地导入包括“英国”记录在内的所有数据?

我正在使用:

  • Ubuntu 18.04
  • Python 3.6.8
  • Django == 2.2.7
  • pkg-resources == 0.0.0
  • pytz == 2019.3
  • spatialite == 0.0.3
  • sqlparse == 0.3.0
  • libgeos-dev == 3.6.2-1build2
  • binutils == 2.30-21ubuntu1〜18.04.2
  • libproj-dev == 4.9.3-2
  • gdal-bin == 2.2.3 + dfsg-2
  • libgdal-dev == 2.2.3 + dfsg-2
  • python3-gdal == 2.2.3 + dfsg-2
django python-3.x ubuntu-18.04 geodjango spatialite
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.