AnsweredAssumed Answered

Python Spatial_ref/Spatial Reference Error 999999

Question asked by JacobHorwitz on Jul 14, 2018
Latest reply on Jul 14, 2018 by Dan_Patterson

I'm learning Python through ESRI Press' "Python Scripting in ArcGIS" and working on Chapter 5 in the downloadable exercise manual. I'm having trouble with the Spatial Referencing for a .prj file in that chapter on page 96.

 

I'm running the code in the tutorial that they stated to put in:

>>> prjFile = "E:\ESRI Press\Python Scripting\Python\Data\Exercise05\facilities.prj"(this is the pathway to my file and different from the pathway stated in the manual)
>>> spatial_ref = arcpy.SpatialReference(prjFile)

 

However, when I try running the code, I get this as a result:

Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\arcobjects\mixins.py", line 992, in __init__
    self._arc_object.createFromFile(item, vcs)
RuntimeError: ERROR 999999: Error executing function.

 

Is there a solution to fixing this error?

Outcomes