Why is my Python toolbox script not working?
As I understand it, it should also run standalone within Pyscripter but when I run it, no output appears in the Python Interpreter, and no file is created in the target geodatabase.
Which is the best way to run Python toolbox?
You haven’t actually told python to run the tool. The best way to run your tool is using arcpy.ImportToolbox from another script or from the python prompt as per PolyGeo’s answer.
Why does Python script do not work but gives no error message?
Please excuse if this seems like a stupid question but i am new to this after all : (. When i run the above script i receive no output as well as no error message resulting in me not knowing what the heck im doing wrong! It’s because, your main () function doesn’t do anything. Change it as following :
Why does Python shell not recognize Python3 hello.py?
Since you are able to run the script using python3 hello.py, it is evident that the issue isn’t with the Python installation or the symlinks. Instead the issue is with the script itself. The shell (here, zsh) didn’t really recognize the shebang as such because of some alien characters before #.
Which is the best way to run ArcPy?
The best way to run your tool is using arcpy.ImportToolbox from another script or from the python prompt as per PolyGeo’s answer. However, what I sometimes do for debugging purposes so I can step through the code is instantiate the tool and call the execute method directly, something like the following.
Is it necessary to delete Py * * in PyScripter?
And frankly, it may not be necessary to delete py**. If not deleting them doesn’t work you can just make a fresh copy of scripter and try again, since that will be a new standalone. For all I know you can reinstall python on the path once pyscripter is set up for each.