Skip to content

Commit

Permalink
Remove dependency of "inspect" module.
Browse files Browse the repository at this point in the history
Tested with QGis 3.2 64 bit from qgis.org on Windows 10 Home.
Tested with QGis 3.2 from "deb http://qgis.org/ubuntugis/ xenial main" on Ubuntu 16.04
Fixes the following error with QGis 3.2 on Windows:
'''
Couldn't load plugin 'GeoCoding' due to an error when calling its initGui() method 
NameError: name 'inspect' is not defined 
'''
  • Loading branch information
mirandadam authored Jul 2, 2018
1 parent dcf37b4 commit e1f5ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GeoCoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def logMessage(self, msg):

def initGui(self):
# Create action that will start plugin
current_directory = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
current_directory = os.path.dirname(os.path.abspath(__file__))
self.action = QAction(QIcon(os.path.join(current_directory, "geocode_icon.png")), \
"&GeoCoding", self.iface.mainWindow())
# connect the action to the run method
Expand Down

0 comments on commit e1f5ea1

Please sign in to comment.