0

I'm using QGIS 3.14, Python 3.7, Processing-Version 2.12.99 and Microsoft Visual Studio 2019 (IDE).

Everything works fine, the only problem I have is the import of the processing-algorithms. Related to the answer of @Germán Carrillo: Using QGIS3 Processing algorithms from standalone PyQGIS scripts (outside of GUI) I have:

import sys

from qgis.core import (
     QgsApplication, 
     QgsProcessingFeedback, 
     QgsVectorLayer
)
from qgis.analysis import QgsNativeAlgorithms

QgsApplication.setPrefixPath(r'C:\OSGeo4W64\apps\qgis', True)
qgs = QgsApplication([], False)
qgs.initQgis()

sys.path.append(r'C:\OSGeo4W64\apps\qgis\python\plugins')

import processing
from processing.core.Processing import Processing
Processing.initialize()
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())

When it comes to line "import processing" I get the following error "triggered exception: no module named '_uuid'": enter image description here

I tried different paths/variables etc. but nothing works. I did not come across a similar problem during my research.

1
  • 2
    Error messages should be included in questions as text. An English translation should be provided if the error is not in English. – Vince Sep 7 '20 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.