Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: object of type 'NoneType' has no len() #20

Closed
zzolo opened this issue Mar 13, 2018 · 3 comments
Closed

Error: object of type 'NoneType' has no len() #20

zzolo opened this issue Mar 13, 2018 · 3 comments

Comments

@zzolo
Copy link

zzolo commented Mar 13, 2018

Hi. I ran into this error when trying to use the LRS plugin. I am stumped on what the issue could be. Maybe something with my data structure.

An error has occurred while executing Python code: 

TypeError: object of type 'NoneType' has no len() 
Traceback (most recent call last):
  File "/Users/-/.qgis2/python/plugins/lrs/lrsdockwidget.py", line 487, in generateLrs
    self.lrs.calibrate()
  File "/Users/-/.qgis2/python/plugins/lrs/lrs.py", line 241, in calibrate
    route.calibrate(self.extrapolate)
  File "/Users/-/.qgis2/python/plugins/lrs/route.py", line 98, in calibrate
    self.buildParts()
  File "/Users/-/.qgis2/python/plugins/lrs/route.py", line 226, in buildParts
    for i in range(len(polys)):
TypeError: object of type 'NoneType' has no len()


Python version: 2.7.10 (default, Jul 15 2017, 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] 
QGIS version: 2.18.7 Las Palmas, exported 
@blazek
Copy link
Owner

blazek commented Mar 13, 2018

It seems that lines are of type which is not supported by plugin. Supported are LineString, LineString25D, MultiLineString, MultiLineString25D. What types are your lines? Other types were probably added in QGIS after the plugin was written.

Can you test also with QGIS 3 and plugin 1.0.2?

@blazek
Copy link
Owner

blazek commented Aug 13, 2018

Closing because of missing feedback.

@blazek blazek closed this as completed Aug 13, 2018
@zzolo
Copy link
Author

zzolo commented Aug 14, 2018

Yeah, sorry, got swamped with other work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants