Right off the bat, this course seems to cover directions in more detail than in the last course, Python for Everyone. I would actually recommend taking this course first so you can better interpret the directions of the other course. That is of course if you don’t encounter the same errors I came across. Sadly, I was not able to complete this course during the semester as I could not fix these errors.
Errors:
In the first exercise, an error may occur at step 5 when setting the environment for the script. When you set the Python Interpreter an error message may pop up in the Python console. It appears as written below (you may have to scroll to read the whole thing):
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\numpy\__init__.py:143: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the-box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
Basically, it wants you to install something called an “mkl service package.” I discovered if you go into the settings and look at the interpreter there is actually an add (plus sign) button that you can add packages. I clicked the add button and made a search for the mkl service package. When I found it I pressed install but some type of administration error occurred. The error may be from the version of Python that you are using so you might have to do some research to find what version of Python works with ArcPro, which I believe is Python 3.7. I also tried to download this version but I am not sure if it was actually successful.
The script for exercise 1 should look like this:
import arcpy # Set environments arcpy.env.workspace = r"C:EsriTraining\PythonGP\Data\SanJuan.gdb" arcpy.env.overwriteOutput = True # Set parameters used to join the BufferDistance table to the Roads feature class inFeatures = "Roads" inField = "ROUTE_TYPE" joinTable = "BufferDistance" joinField = "ROUTE_TYPE" # Script Joins table to feature class arcpy.JoinField_management(inFeatures, inField, joinTable, joinField) # Set parameters used to buffer Roads feature class outBuffers = "RoadBuffers" buffField = "DISTANCE" # Buffer the roads based on DISTANCE attribute arcpy.Buffer_analysis(inFeatures, outBuffers, buffField)