[Qgis-user] module 'qgis.processing' has no attribute 'run'

Miguel Eduardo Rincon De Hoyos merinconh at unal.edu.co
Tue Jul 7 10:00:17 PDT 2020


Thanks a lot!
Here I have the original code.
output=processing.run('qgis:clip',{'INPUT': input_layer, \
#output=general.run('qgis:clip',{'INPUT': input_layer, \
'OVERLAY': clip_layer, 'OUTPUT': "memory:"})
outputlayer=output['OUTPUT']

The problem was here. When I wrote these lines and ir woked

sys.path.append('~.local/share/QGIS/QGIS3/profiles/default/python/')
sys.path.append('/usr/share/qgis/python')
sys.path.append('/usr/share/qgis/python/plugins')

El mar., 7 jul. 2020 a las 0:01, Stefan Giese (WhereGroup) (<
stefan.giese at wheregroup.com>) escribió:

> Miguel
>
> or you can use also "processing.runAndLoadResults(...)" to load the result
> directly into QGIS
>
> regards
>
> Stefan
> Am 07.07.2020 um 06:25 schrieb Christoph Jung:
>
> Hi Miguel,
>
> You call the run-method on an variable called „general“. But using the
> processing framework will be realised by calling “processing.run(...)”.
> Maybe this is the problem?
>
> Sincerely,
> Christoph
>
> Am 07.07.2020 um 00:18 schrieb Miguel Eduardo Rincon De Hoyos
> <merinconh at unal.edu.co> <merinconh at unal.edu.co>:
>
> 
>
> Dears members
>
> I am using Python for my postgraduate studies and I am having trouble
> running my code when I try to use processing in Qgis using the
> command-line interface.
>
> I think the error is really easy to fix it but right now I do not know how
> to fix it. When I run my code I have this
>
> Traceback (most recent call last):
>   File "urban_canopy_element.py", line 100, in <module>
>     output=general.run('qgis:clip',{'INPUT': input_layer, \NameError: name 'run' is not defined
>
>
> Thanks for the help
>
> Regards
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> _______________________________________________
> Qgis-user mailing listQgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
> --
> Mit freundlichen Grüßen
> Stefan Giese
> Projektleiter/Consultant
> ------------------------------------------------------
> Aufwind durch Wissen!
> Jetzt neu: Webinare und Online-Schulungen
> bei der www.foss-academy.com
> ------------------------------------------------------
>
> WhereGroup GmbH
> Schwimmbadstr. 2
> 79100 Freiburg
> Germany
>
> Fon: +49 (0)761 / 519 102 - 61
> Fax: +49 (0)761 / 519 102 - 11
> stefan.giese at wheregroup.comwww.wheregroup.com
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200707/99d5c484/attachment.html>


More information about the Qgis-user mailing list