Page 1 of 1

QGIS - AttributeError: 'Nonetype' Objekt hat kein Attribut -Name 'Name'

Posted: 27 Feb 2025, 11:49
by Anonymous
Hallo, ich habe ein Python -Problem, wenn ich versuche, ein Plugin auf QGIS zu starten.

Code: Select all

    def get_data_source_file_path(layer):
# get source path
provider = layer.dataProvider().name()
source_parts = QgsProviderRegistry.instance().decodeUri(provider, layer.source() )
source_path = source_parts.get( 'path', '' )
if 'ogr' == provider.lower():
source_path = source_path.split('|')[0]
return path.normpath( source_path )
'Nonetype' Objekt hat kein Attribut 'Name'
Kann mir jemand helfen?