I'm new to Qgis, and i'm stuck with a simple task, I have a csv file with points coordinates and i would like to connect those points in a path, I'm working with wildlife movement data. i've tried with the qgis algorithm and several plugins like Points2one, PointsToPath, and Point Connector but every time I get the same python error. This is the log:

Traceback (most recent call last):
              File "/home/gabriele/.qgis2/python/plugins/pointstopaths_v02/pointstopathsdialog.py", line 89, in accept
                points = processor.generatePointDict()
              File "/home/gabriele/.qgis2/python/plugins/pointstopaths_v02/processfeatures.py", line 52, in generatePointDict
                self.coords = self.geom.asPoint()
AttributeError: 'NoneType' object has no attribute 'asPoint'

Since I've zero knowledge of python code, what I'm doing wrong?

  • Could you post some snippets of your code? That would help in debugging.
    – MaryBeth
    Commented Jun 6, 2016 at 14:49
  • If you have imported your csv into QGIS as a points layer, you could also try using the algorithms Points to path and Convert Points to Line(s) from the Processing Toolbox.
    – Joseph
    Commented Jun 6, 2016 at 14:54
  • I've tried but i can only get this line: 'NoneType' object has no attribute 'asPoint' See log for more details
    – Gab
    Commented Jun 6, 2016 at 14:57
  • Can you share your CSV for test purposes? If all tools fail, it's most likely a data issue ...
    – underdark
    Commented Jun 6, 2016 at 16:26

1 Answer 1


This can happen if you import data with missing geometries. I was able to reproduce this error in Points2One with the following CSV... note the 'woot' entry which is missing data.


QGIS will happily load this without warnings.

Calling Point2One on this throws a similar exception:-

File "/home/steven/.qgis2/python/plugins/points2one/p2o_engine.py", line 121, in iter_points
geom = feature.geometry().asPoint()
AttributeError: 'NoneType' object has no attribute 'asPoint'

I suspect the same thing will be happening with the other plugins.

You should make sure you :-

  • import with geometry (make sure you don't have the 'No geometry (attribute only)' selected)
  • have geometry values for ALL rows : either an x and y field, or a WKT field, and none of these fields are blank

If you're using Excel (or similar) you can use sort/filter to export a new copy of your csv with all such rows excluded, and see if that works.

  • 1
    I checked my csv file and in fact some coordinate values were missing, I excluded that rows as you suggested and now the plugins are working fine. Thank you very much!
    – Gab
    Commented Jun 6, 2016 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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