Bug #4172

fails trying to use a memory layer

Added by Alister Hood almost 2 years ago. Updated about 1 year ago.

Status:Closed Start Date:02/09/2012
Priority:Normal Due date:
Assigned to:Ricardo Silva % Done:

0%

Category:-
Target version:-
Patch supplied:No

Description

It fails like this if you attempt to use a memory layer (e.g. created by the "New memory layer" plugin):

An error has occured while executing Python code:

Traceback (most recent call last):
File "C:/Documents and Settings/alister.hood/.qgis/python/plugins\ProfileFromLine\ProfileFromLineDialog.py", line 54, in accept
self.ui.progressBar)
File "C:/Documents and Settings/alister.hood/.qgis/python/plugins\ProfileFromLine\ProfileFromLine.py", line 153, in create_profile_layer
stepInterval = int(remainingSteps / numberOfLines)
ZeroDivisionError: long division or modulo by zero


Related issues

duplicated by Profile from Line plugin - Bug #4962: Error when the line is over Null values Closed 02/07/2012

History

Updated by Ricardo Silva over 1 year ago

  • Status changed from New to Feedback
  • Assigned to set to Ricardo Silva
  • Priority changed from Low to Normal
  • Start Date changed from 08/15/2011 to 02/09/2012

Hi Alister

Sorry that I didn't reply earlier... I'd like to work on this issue but I can't reproduce the error. I can use the plugin just fine in conjunction with the 'New Memory Layer' plugin.

Can you please provide a bit more feedback on the error you got? What GUI settings did you use? What type of memory layer was created? If you can include a screenshot it would probably help.

Thanks for your efforts.

Updated by Alister Hood over 1 year ago

Oh, I see. Sorry.
That's the error you get if you try to use a polyline layer without any features in it. I must have forgotten to click the "save" button to save the layer after drawing my lines.
I guess it would be best to catch this error and provide a dialogue saying something like: "Error: the lines layer selected does not have any features. Check that you added some features and saved the layer".

Updated by Ricardo Silva over 1 year ago

  • Status changed from Feedback to Resolved

I guess this is fixed. I've added a filter to activate the plugin's button in the GUI only if one of the available vector lines layers has some features.

Updated by Ricardo Silva about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF