Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. from qgis.core import QgsProject
  2.  
  3. from PyQt5.QtWidgets import QAction, QFileDialog
  4.  
  5. def Upload_Point_Layer(self):
  6. filename, _filter = QFileDialog.getSaveFileName(
  7. self.dlg, "Select output file ","", '*.shp')
  8. self.dlg.lineEdit.setText(filename)
  9.  
  10. self.dlg.pushButton.clicked.connect(self.Upload_Point_Layer)
  11.  
  12. Couldn't load plugin 'Nearest_Neighbour' due to an error when calling its classFactory() method
  13.  
  14. AttributeError: 'NearestNeighbour' object has no attribute 'dlg'
  15. Traceback (most recent call last):
  16. File "C:/OSGeo4W/apps/qgis/./pythonqgisutils.py", line 335, in startPlugin
  17. plugins[packageName] = package.classFactory(iface)
  18. File "C:/Users/Prachi/AppData/Roaming/QGIS/QGIS3profilesdefault/python/pluginsNearest_Neighbour__init__.py", line 36, in classFactory
  19. return NearestNeighbour(iface)
  20. File "C:/Users/Prachi/AppData/Roaming/QGIS/QGIS3profilesdefault/python/pluginsNearest_NeighbourNearest_Neighbour.py", line 73, in __init__
  21. self.dlg.lineEdit.clear()
  22. AttributeError: 'NearestNeighbour' object has no attribute 'dlg'
  23.  
  24. if self.first_start == True:
  25. self.first_start == False
  26. self.dlg = SaveAttributeDialog()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement