Import arcpy error after it worked for months?

2192
3
11-10-2020 06:45 PM
XavierNogueira
New Contributor

Hi all,

So I have an incredibly frustrating error that is severely impeding my ability to do my job right now and all help would be appreciated. I have been using arcpy without issue for months, but today, after changing literally nothing I know get an error at the 'import arcpy' command.

It looks like this:

File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 74, in <module>
    from arcpy.geoprocessing import gp
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
    from ._base import *
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
    import arcgisscripting
  File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgisscripting\__init__.py", line 119, in <module>
    from ._arcgisscripting import *
RuntimeError: The Product License has not been initialized.

I have searcher around and while others have never gotten arcpy to work and have issues, I haven't seen anyone else with arcpy just suddenly failing on them.

Please help me out! What are some ways I can pinpoint and solve this issue.

Tags (1)
0 Kudos
3 Replies
curtvprice
MVP Esteemed Contributor

Are there any issues with your ArcGIS Pro license when you start it up and look at the licensing?

If your license server is unreachable, Pro will not work either.

Another issue to check out if you have checked out your license and it has timed out. Looking at Pro would illuminate that issue as well.

by Anonymous User
Not applicable
Deleted
GlenShepherd
Esri Contributor

Some additional troubleshooting steps...

  • check in ArcGIS Pro > Settings > Python > are you using a default python environment or cloned one? if a clone, try switching back to default and testing the script again.
  • check whether any of your geoprocessing tools are working in AcrGIS Pro
  • run a Repair on the ArcGIS Pro installation
  • is Data Interoperability for ArcGIS Pro installed? have you recently uninstalled and reinstalled ArcGIS Pro? If yes to both, uninstall Data Interoperability, reboot and test your script again.