PyQGIS Processing Toolbox – Adding Script to QGIS

pyqgisqgis-processingtoolbox

I have a script and I would like to add it to the processing toolbox via Add Script to Toolbox using the Python icon. I received this error and I could not add my script to the processing toolbox.

The error:

2023-02-21T12:30:31 WARNING Could not copy script 'C:/Users/Pagheh/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/scripts/ttt.py'
'C:/Users/Pagheh/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/scripts/ttt.py' and 'C:\Users\Pagheh\AppData\Roaming\QGIS\QGIS3\profiles\default\processing\scripts\ttt.py' are the same file

What can I do to fix it?

Best Answer

  • Try by going in the folder %APPDATA%\QGIS\QGIS3\profiles\default\processing\scripts
  • Cut the ttt.py file then paste it in an other folder
  • Retry adding the script under QGIS
Related Question