This is probably a silly question, but I'm having a problem whenever I load a Python script in ArcMap where extra dots are loaded with the script (see below) that I must manually delete prior to running the script. This gets quite annoying, especially when having to run long scripts multiple times. Whenever I write a new script, I just click 'Save As' and specify a Python file, and later load the Python file through the Python window. Is there any way to format the Python files/properties to avoid this from occurring?

... ... # Import system modules
... ... import arcpy
... ... from arcpy import env
... ... from arcpy.sa import *
... ... import math
  • First, welcome to the site @phdstudentuky ! Quick question to help you resolve this - when you've save the Python script are the dots in the file itself? You can open the file in any text editor or IDE (Visual Studio Code is a good place to start if you don't already have a preference) – om_henners Feb 14 at 22:25
  • Thanks so much @om_henners! Yes, they do appear in the file when I open it in Notepad: code ... # Set environment settings ... env.workspace = "C:\Users\dtma224\Desktop\PhD\Paper 2\Timing\Time and Bins" ... # Check the ArcGIS Spatial Analyst extension license Not 100% sure how the formatting works in comments, but the ... is at the beginning of each new line of code. – phdstudentuky Feb 15 at 12:51
  • What software was used to create the script in the first place? What happens if you remove the dots in a text editor, save it, and then load the file as normal? – smiller Aug 29 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.