g-sherman / Script-Runner

Run a Python script in QGIS to automate tasks
http://hub.qgis.org/projects/scriptrunner
9 stars 5 forks source link

cannot use external editor in scriptrunner 3 (using win. 8.1, qgis 3.4.0 (OSGEO4W64) and python 37) #7

Open damidb opened 5 years ago

damidb commented 5 years ago

hello mr, mrs,

following message when trying to edit testfile.py in scriptrunner 3 plugin:


Traceback (most recent call last): File "C:/Users/myname/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\scriptrunner3\scriptrunner.py", line 848, in edit_script str(self.custom_editor)) pywintypes.error: (123, 'GetShortPathNameW', 'The filename, directory name, or volume label syntax is incorrect.')


(did not have that problem with qgis standalone 2.7 "las palmas") I case you respond: please notice I'm not an IT-specialist just a user trying to do some exercises in python with qgis - so keep is easy if possible please

g-sherman commented 5 years ago

Sounds like it can't find your external editor. What have you entered for the full path to the editor?

damidb commented 5 years ago

I entered the following path for my external editor: C:\Windows\System32 but it's working after changing in C:\Program Files (x86)\LibreOffice 4\program\swriter.exe don't ask me why... sorry for late reply.. busy..

ytreka3 commented 5 months ago

Hi, I tried to set a default external editor in Scriptrunner 3, using the following steps: click on menu plugins in Qgis click on scriptrunner and scriptrunner 3 icon click on gear icon in general options, click on "Edit scripts using" checkbox and select the path of Visual Studio Code But the the program at this point advise me in this way:

TypeError: setText(self, str): argument 1 has unexpected type 'tuple' Traceback (most recent call last): File "C:\Users/Salvo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\scriptrunner3\preferences_dialog.py", line 94, in editor_path self.ui.leCustomEditorPath.setText(self.editor_path) TypeError: setText(self, str): argument 1 has unexpected type 'tuple'

Why this error happens? Thank you