Exporting layer to shapefile using PyQGIS?
It's all about user rights.
Just changed to a directory I'm allowed to write, everything works fine.
_writer = QgsVectorFileWriter.writeAsVectorFormat(_vlayer,r"C:/Users/myName/xx/hoppla.shp","utf-8",None,"ESRI Shapefile")