.bat file trouble.
Christian Gollwitzer
auriocus at gmx.de
Fri Sep 18 09:45:30 EDT 2015
Am 18.09.15 um 11:06 schrieb bobertini at googlemail.com:
> Hi,
>
> I have two files called module_scripts.py and build_q_scripts.bat.
>
> The problem being that when I go to run the bat file it produces a
> few errors which neither myself or the original owner of the files
> could understand.
>
> Errors:
>
> https://gyazo.com/c680f0d70cefe855c21ab0882d7c17b7
The first error indicates, that you are running Python 3, and the script
was made for Python 2. In Python 3, print is a function so you need
parentheses around that print("Initializing...") - either fix that
or install Python 2.
The second error "TabError" also relates to it, it means that the file
mixes tabs and spaces for indentation. Fix it by expanding all tabs to
spaces in an editor.
> We originally thought that it was because it was missing the files:
> process_init.py and process_global_variables.py however they are
> right there in the same directory.
Concerning that, windows usually runs a .bat file in the directory where
it is situated, so putting the python fies there /should/ work, but you
can also set this using the right-click menu (execute in...), if you
make a link to the desktop.
Christian
More information about the Python-list
mailing list