Why can't I load a .shp file with the Python Console in QGIS?

المشرف العام

Administrator
طاقم الإدارة
I'm trying to load a shape file into QGIS using iface.addVectorLayer, but whenever I do this, I get an error message "Layer is not valid: etc ..."However, if I try to load the same .shp file use the menu dialog "Add Vector Layer", it loads fine.I have loaded raster files, so I know it's not some funny with the path name.I'm sure I'm missing something obvious here, but what?



أكثر...
 
أعلى