Bug report #10344

Select from open layers on Processing

Added by Pedro Venâncio over 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:High
Assignee:Victor Olaya
Category:Processing/Core
Affected QGIS version:master Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18765

Description

Hi,

Using the option "Select from open layers" in the second parameter of any tool in Batch Processing, gives this error, with QGIS master (2.3.0+git20140524+d1da612) and Processing 2.2.0-2:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/home/pedro/.qgis2/python/plugins/processing/gui/BatchInputSelectionPanel.py", line 93, in showLayerSelectionDialog
    self.text.setText(layers[selected[0]])
TypeError: QLineEdit.setText(QString): argument 1 has unexpected type 'QgsVectorLayer'

Python version:
2.7.6 (default, Mar 22 2014, 23:03:14) 
[GCC 4.8.2]

QGIS version:
2.3.0-Master Master, exported

This does not happens with QGIS 2.2 and Processing 2.2.0-2. Tested on Linux.

To replicate:

1. Search for "Clip" in Processing Toolbox;
2. Execute as batch process;
3. On "Clip layer" -> [...] -> Select from open layers and select one layer from TOC.

History

#1 Updated by Pedro Venâncio over 10 years ago

This is related to #10277.

I already have the commit 9733ae8 applied

            if len(selected) == 1:
                self.text.setText(layers[selected[0]].name())
            else:

but I get this error.

#2 Updated by Giovanni Manghi over 10 years ago

  • Status changed from Open to Feedback

Hi Pedro,

I'm on Ubuntu 12.04 and qgis master (clean install) from nightly build repo and cannot confirm this issue.

#3 Updated by Pedro Venâncio over 10 years ago

Hi Giovanni,

This is happening to me with QGIS master on Ubuntu 14.04.

On the machine with Ubuntu 12.04, I'm using QGIS 2.2, and the problem does not happen.

#4 Updated by Giovanni Manghi over 10 years ago

Pedro Venâncio wrote:

Hi Giovanni,

This is happening to me with QGIS master on Ubuntu 14.04.

On the machine with Ubuntu 12.04, I'm using QGIS 2.2, and the problem does not happen.

Olá Pedro,

I just installed qgis master (nightly repo) on a brand new 14.04 virtual machine and cannot replicate the issue.

#5 Updated by Pedro Venâncio over 10 years ago

  • Status changed from Feedback to Closed

Olá Giovanni,

Sorry, I checked the correction of the commit in the Core Processing folder, instead of Processing folder in .qgis2.

So, commit 9733ae8 solves the problem!

Thanks and sorry for the noise!

#6 Updated by Giovanni Manghi over 9 years ago

  • Category changed from 94 to Processing/Core

Also available in: Atom PDF