0

A script I created to accept command line variables seems to have randomly stopped working when either run through command line or simply double-clicked through Windows Explorer. Other python scripts seem to work fine and it's just this script that doesn't work.

The script functions fine through Idle (it just prompts you for the variables).

The error I get is:

'autoUpdate.py' is not recognized as an internal or external command, operable program or batch file

The script itself is used as a file crawler to update a geospatial database with automatic run times throughout the week with Windows task scheduler.

3 Answers3

1

Python programs aren't run as standalone applications (not without some work) They are filled with commands that need to be run with an interpreter. On Windows the best way to run python scripts is by specifying the python interpreter first followed by the script name.

python autoUpdate.py
Back2Basics
  • 6,301
  • 1
  • 30
  • 39
1

make sure your directory is the path the python file is or do

$ python /dir_path/autoUpdate.py

myMe
  • 25
  • 6
0

Alright, I don't know what happened but it seems as though it started working again. But at the same time it popped up an error with regards to a unicode error in one of my print statements (which I fixed). Its working now but I really need to find a 'Python unicode/utf-8 tutorial for dummies' type document because I'm always having this issue. Argggh.

  • Try [here](http://stackoverflow.com/questions/11339955/python-string-encode-decode/25213500#25213500). The question is pretty specific, but there's some broader info that might help you. The accepted answer has a link to a PowerPoint on the subject, and other answers go more in depth as well. – jpmc26 Sep 08 '15 at 05:46