2

I have a bunch of scripts written that run daily using Windows Task Scheduler. Yesterday i updated my version of ArcGIS from 10.1 to 10.3.1. Python was also updated to 2.7.8 as part of that installation. After the update, all my scheduled scripts get an error message of "1% is not a valid Win32 application. (0x800700C1)"

This is the action tab, which worked fine before the update.

Under the settings tab i set "if the task is already running, then the following rule applies:" to "Stop the existing instance"

It is also set to run whether the user is logged on or not.

What am i missing?

1
  • 2
    I dont imagine this is a "scheduled task" problem. What is the result of taking the command and running it yourself at command line? I imagine the same? The error you're reporting is typical of some system setting being wrong and the wrong python is called.
    – KHibma
    Jan 31, 2017 at 18:04

2 Answers 2

4

I would hazard a guess that the path to your python.exe changed. You many need to update your environment variables.

If you go to your control panel search for Environment Variables. Now under System Variables there is a variable called Path. Here you can add default paths to windows so it know about other programs, like python.

So first I have a variable called PY_HOME in my User variables which has a value of C:\Python27.

Second, in the Path variable under System Variables I append to what is already there. I add "%PY_HOME%;%PY_HOME%\Lib;%PY_HOME%\DLLs;%PY_HOME%\Lib\lib-tk;".

If that doesn't work you could also have your task run python.exe and pass your .py file to that as an argument.

0
0

It turns out that there were enough changes between ArcGIS 10.1 and 10.3 that every single one of my scripts was broken in some way or another.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.