1

I am trying to use the contour plugin in QGIS 2.18.4 Las Palmas on Windows 10 (both are 64bit). When I choose the layer I want to use there is not problem. However when I select the field, I receive the following error message:

An error has occurred while executing Python code:

IndexError: index 0 is out of bounds for axis 0 with size 0

Traceback (most recent call last):
  File "C:/Users/mygis/.qgis2/python/plugins\contour\contour.py", line 349, in uDataFieldUpdate
    self.reloadData()
  File "C:/Users/mygis/.qgis2/python/plugins\contour\contour.py", line 360, in reloadData
    data=self.getData()
  File "C:/Users/mygis/.qgis2/python/plugins\contour\contour.py", line 799, in getData
    self.checkGridded()
  File "C:/Users/mygis/.qgis2/python/plugins\contour\contour.py", line 231, in checkGridded
    nr = ends[0]
IndexError: index 0 is out of bounds for axis 0 with size 0

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.18.4 Las Palmas, 59c1d21

Python Path:

C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python
C:/Users/mygis/.qgis2/python
C:/Users/mygis/.qgis2/python/plugins
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\jsmin-2.2.1-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\gsconfig-1.0.3-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\gisdata-0.5.4-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\httplib2-0.9.2-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\requests-2.9.1-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\jsbeautifier-1.6.2-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\six-1.10.0-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\jsmin-2.2.1-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\gsconfig-1.0.3-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\BeautifulSoup-3.2.1-py2.7.egg
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs\BeautifulSoup-3.2.1-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\certifi-14.05.14-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\bin\python27.zip
C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\plat-win
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\lib-tk
C:\PROGRA~1\QGIS2~1.18\bin
C:\PROGRA~1\QGIS2~1.18\apps\Python27
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PIL
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Pythonwin
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
C:/Users/mygis/.qgis2//python
C:\Users\mygis\.qgis2\python\plugins\mgrstools\ext-libs
C:\Users\mygis\.qgis2\python\plugins
C:\Users\mygis\.qgis2\python\plugins\webappbuilder\ext-libs
C:/Users/mygis/.qgis2/python/plugins\webappbuilder
C:/Users/mygis/Desktop/IIUM/thesis/map
C:/Users/mygis/.qgis2/python/plugins\webappbuilder
  • Please write something about your data source and the projection you are using. – Stefan Mar 9 '17 at 11:08
  • The data source is in shapefile format (EPSG:4326 : WGS84) The field I am using is double with lengh = 1 and precision = 1 – MyGIS Mar 9 '17 at 11:16
0

After studying the data closely, I came to notice that the Shapefile was not a point geometry but a multipoint. I converted it using FME Desktop into a point geometry and now I am able to use the contour plug in QGIS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.