Select to view content in your preferred language

Python Application Error 0xs0000022 when run with service account

1657
3
03-05-2020 08:46 AM
Arne_Gelfert
Frequent Contributor

Just when you think you've read every thread about arcpy/Pro to get your script to run and feel confident to have mastered this ridiculous convoluted world, you're back to square zero. I mean I have literally spent hours reading about installation/configuration of Python 3.x/conda with ArcGIS Pro. I've replied to a number of threads feeling knowledgeable enough to chime in. But I don't know what's going on here.

 

I have an SDE maintenance script running on one server under a service (domain) account, and it works beautifully. I had to:

  • Install Pro (this is 2.3).
  • Create a Portal user for the service account (for licensing) and make it admin.
  • Open Pro on server once and connect to correct portal.
  • Upgrade to latest version of arcgis package. No other changes to conda env.
    • Only: C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
  • Write my script.
  • Set up a Windows Scheduled task to use service account and run script with highest privileges
  • Grant service account logon-as-service/RDP access
  • Cross my fingers, and ..

Boom everything worked.

 

Now, on server 2, where I did the exact same thing, same script, same tasks, same service account, nothing happens.

  • Can't run Python as service account. That gives me an Application Error 0xs0000022.

     

    The application was unable to start correctly (0xc0000022). 
    Click OK to close the application.
  • Inside Pro (running as srv account), I can open Python window but when I import arcpy, I get:
    PermissionError: [Errno 13] Permission denied:
     'C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\
    envs\\arcgispro-py3\\Lib\\site-packages\\mkl_fft\\__init__.py'
    

What am I doing wrong, what step did I skip or screw up on ? Thanks.

3 Replies
awdowner
Emerging Contributor

@Arne_Gelfert Did you ever find a solution to this?

0 Kudos
Arne_Gelfert
Frequent Contributor

Sorry only seeing this now. But it's been a few years and countless upgrades since. I know I got it to work eventually and suspect it must have been service account permissions or something like that. Sorry to not be of more help.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Often times when running a script with a service account, the licensing information for ArcGIS Pro is not configured correctly.  Whereas ArcGIS Desktop/ArcMap was licensed at the machine level, ArcGIS Pro is licensed at the user level. 

0 Kudos